melsahn
06-18-2009, 05:41 AM
whats up fellas? ---Im having this issue running this textbox macro in vba, everytime i trigger the macro textbox to run, the textbox comes up empty in its range. Has anyone had this problem before? Please any help would be appreciatted. Thanks fellas!
Sub Hello()
'
' Hello Macro
'
'
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 503.25, 348.75, _
238.5, 13.5).Select
Selection.Characters.Text = "Hello"
With Selection.Characters(Start:=1, Length:=31).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.HorizontalAlignment = xlCenter
End Sub
Sub Hello()
'
' Hello Macro
'
'
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 503.25, 348.75, _
238.5, 13.5).Select
Selection.Characters.Text = "Hello"
With Selection.Characters(Start:=1, Length:=31).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.HorizontalAlignment = xlCenter
End Sub