注册 登录
编程论坛 VFP论坛

VFP中怎么设置EXCEL单元格边框

mywisdom88 发布于 2023-02-26 22:31, 896 次点击
宏是这样的,但xlNone,xlDiagonalDown,等等,不知道是什么数值
Sub 宏1()
    Range("B13:E15").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .ColorIndex = xlAutomatic
        .TintAndShade = 0
        .Weight = xlThin
    End With
End Sub

4 回复
#2
吹水佬2023-02-26 22:52
只有本站会员才能查看附件,请 登录
#3
mywisdom882023-02-26 23:00
你这个窗口在哪里的?VFP?在哪里可以查到这些数据的?
#4
mywisdom882023-02-26 23:29
找到位置了
xlAutomatic -4105
xlThin 2
xlContinuous 1
xlInsideHorizontal 12
xlInsideVertical 11
xlEdgeRight 10
xlEdgeBottom 9
xlEdgeTop 8
xlEdgeLeft 7
xlNone -4142
xlDiagonalUp 6
xlDiagonalDown 5
#5
schtg2023-02-27 06:23
学习啦,谢谢!
1