biocentrism
Board Regular
- Joined
- Jul 28, 2014
- Messages
- 187
Hello
I am drawing a line on a sheet using:
The arguments are AddLine(x-Start, y-Start, x-End, y-End).Select.
How would I set a variable in place of the the numeric coordinates which would equal "the middle of column Q" for example?
My sheet has columns that vary in width depending on the length of the data in the cells. So I would like the line to be positioned such that x-Start and x-End = "the middle of Column Q".
Can this be done?
Thank you.
I am drawing a line on a sheet using:
Code:
'Insert Line
ActiveSheet.Shapes.AddLine(755, 165, 755, 450).Select
Selection.ShapeRange.ShapeStyle = msoLineStylePreset3
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 1.5
End With
The arguments are AddLine(x-Start, y-Start, x-End, y-End).Select.
How would I set a variable in place of the the numeric coordinates which would equal "the middle of column Q" for example?
My sheet has columns that vary in width depending on the length of the data in the cells. So I would like the line to be positioned such that x-Start and x-End = "the middle of Column Q".
Can this be done?
Thank you.