读书人

怎么把向上画线的代码改为向下画线的

发布时间: 2013-01-04 10:04:12 作者: rapoo

如何把向下画线的代码,改为向上画线的代码。(vba)
请各位老师指教:
如何把向下画线的代码,改为向上画线的代码。谢谢。
With Selection
ActiveSheet.Shapes.AddLine .Left, .Top, .Left + .Width, .Top + .Height
ActiveSheet.Shapes.AddLine .Left, .Top, .Left + .Width, .Top + .Height / 2
ActiveSheet.Shapes.AddLine .Left, .Top, .Left + .Width, .Top + .Height * 3 / 4
ActiveSheet.Shapes.AddLine .Left, .Top, .Left + .Width, .Top + .Height / 4
ActiveSheet.Shapes.AddLine .Left, .Top, .Left + .Width / 2, .Top + .Height
ActiveSheet.Shapes.AddLine .Left, .Top, .Left + .Width * 3 / 4, .Top + .Height
ActiveSheet.Shapes.AddLine .Left, .Top, .Left + .Width / 4, .Top + .Height
End With
[解决办法]
前一是右下角向下画
下面是左下角向上画
With Selection
ActiveSheet.Shapes.AddLine .Left, .Top + .Height, .Left + .Width, .Top
ActiveSheet.Shapes.AddLine .Left, .Top + .Height, .Left + .Width, .Top + .Height / 4
ActiveSheet.Shapes.AddLine .Left, .Top + .Height, .Left + .Width, .Top + .Height / 2
ActiveSheet.Shapes.AddLine .Left, .Top + .Height, .Left + .Width, .Top + .Height * 3 / 4
ActiveSheet.Shapes.AddLine .Left, .Top + .Height, .Left + .Width * 3 / 4, .Top
ActiveSheet.Shapes.AddLine .Left, .Top + .Height, .Left + .Width / 2, .Top
ActiveSheet.Shapes.AddLine .Left, .Top + .Height, .Left + .Width / 4, .Top
End With

读书人网 >VB

热点推荐