frank_m
04-19-2011, 06:35 AM
I know this syntax is wrong but I need something similar to--ActiveCell.Column (1), Column(24).Width
Thanks
Sub Macro1()
Dim LeftPos As Integer, TopPos As Integer, intWidth As Integer, intHeight As Integer
Dim shp As Shape
ActiveSheet.TextBoxes.Delete
LeftPos = 0
TopPos = ActiveCell.Top + ActiveCell.Height + 1
intWidth = 1350 ' need width of column 1 to 24
intHeight = 0.75
Set shp = ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, _
LeftPos, TopPos, intWidth, intHeight)
With shp
.Name = "BottomOfRowIndicator"
.Line.ForeColor.SchemeColor = 10
End With
End Sub
Thanks
Sub Macro1()
Dim LeftPos As Integer, TopPos As Integer, intWidth As Integer, intHeight As Integer
Dim shp As Shape
ActiveSheet.TextBoxes.Delete
LeftPos = 0
TopPos = ActiveCell.Top + ActiveCell.Height + 1
intWidth = 1350 ' need width of column 1 to 24
intHeight = 0.75
Set shp = ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, _
LeftPos, TopPos, intWidth, intHeight)
With shp
.Name = "BottomOfRowIndicator"
.Line.ForeColor.SchemeColor = 10
End With
End Sub