View Single Post
 
Old 09-07-2010, 05:46 AM
t0m46 t0m46 is offline Windows 7 Office 2007
Novice
 
Join Date: Sep 2010
Posts: 2
t0m46 is on a distinguished road
Exclamation Textbox Number changes when I open Word

Hey all,

I have code that shows/hides a textbox. The problem that i am having is that everytime i open the document with it in the textbox number changes randomly, with then causes the macro to crass as the textbox cant be found.

this is my code.

Code:
 
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
    ActiveDocument.Shapes("AutoShape 57").Visible = True
Else
    
     ActiveDocument.Shapes("AutoShape 57").Visible = False
End If
End Sub
the Autoshape 57 keeps changing randomly every time it opens.

is there any reason why this happens?

Thanks
Reply With Quote