I just did that this morning because I got a message box in place of the
control I tried to place that said an object wasn't define in the paint
event for one of the controls on the control.
So I added:
if designmode then exit sub
in that routine and a couple of others that I thought might get called in
design mode.
I don't know if that's the end of these problems but it fixed it for now.
Thanks a lot
"jjardine" <jj******@bellsouth.net> wrote in message
news:e0**************@TK2MSFTNGP14.phx.gbl...
" Just Me" <gr****@a-znet.com> wrote in message
news:O8**************@TK2MSFTNGP10.phx.gbl...I have a usercontrol I created on a form.
Every once in a while it will disappear from the form but the statement
Friend WithEvents ControlText1...
is still there but the rest of the windows created statements relating to
it have disappeared!
Real pain as I then have to replace the control on the form and reset the
properties.
Is there any help for this?
I have had this same thing happen to me as well. I noticed that in one
instance it is happening because I was trying to set some data in
Control_Load that in design mode didn't exist. This caused the above
result. If I checked if I was in design mode or not I was able to stop
this behavior.