The below code works well (If I use activesheet), however there are many tabs in the workbook. If a user is on another worksheet besides the ("Pricing") sheet vba bombs on the line in red.
How can I ask the code to execute on line when I haven't even assigned a name (which is directly under the red line.
Thank you for any help.
How can I ask the code to execute on line when I haven't even assigned a name (which is directly under the red line.
Code:
Sheets("Pricing").Shapes.AddTextBox(msoTextOrientationHorizontal, 803.8235433071, _
1.7647244094, 607.9411811024, 189.7058267717).Select
[COLOR=#ff0000][B]Selection.ShapeRange.Line.Visible = msoFalse[/B][/COLOR]
Selection.Name = "txtBox1"
Range("F10:J10").Select
Thank you for any help.