In Excel need macro to tell if Text Box is Blank or has Text

J

Jerry Dyben

In Excel I need a macro to tell me if the Text Box Number is Blank or has
Text in it.
 
D

Dave Peterson

Textboxes on the worksheet?

'if from the control toolbox toolbar
MsgBox Len(Worksheets("sheet1").TextBox1.Value)

'if from the Drawing toolbar
MsgBox Len(Worksheets("sheet1").TextBoxes("Text box 2").Text)

You could just look to see if it was equal to "", too.
 
Top