Test for text boxes
If you know the number of textboxes on the sheet you could alway use
("Expense").TextBoxes.count to see first if it exists.
You could (not advisable) preface the delelete statement with 'on error
resume next'
or you could use :
if isobject(("Expense").TextBoxes("textbox 2")) then
Worksheets("Expense").TextBoxes("textbox 2").Delete
end if
"Jim G" wrote in message
...
I want to test for a text box ("text box 2"). If it exists delete it if
not
do nothing.
I can delete the text box with 'Worksheets("Expense").TextBoxes("textbox
2").Delete' before I print the sheet. However, if the worksheet is
reprinted
it comes up with an error because it can't find the text box.
Any suggestions appreciated.
--
Jim
|