首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

怎么把向下画线的代码,改为向上画线的代码。(vba)

2012-05-28 
如何把向下画线的代码,改为向上画线的代码。(vba)请各位老师指教:如何把向下画线的代码,改为向上画线的代码

如何把向下画线的代码,改为向上画线的代码。(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

热点排行