end_range就是一个单元格
last_y是前一个单元格水平线的y值,now_y是当前单元格水平线的y值
-
ver_ps = sht.Cells(end_range.Row, j).Left adl_vb = adl_v(ver_ps, last_y, now_y) Public Function adl_v(x As Single, last_y As Single, now_y As Single) As Boolean '绘制竖直线 With ActiveSheet.Shapes.AddLine(x, last_y, x, now_y).Line .Weight = 2 .ForeColor.RGB = RGB(0, 0, 0) End With End Function
明明传入X都一样为啥画出来的线是斜的