Delete a control deletes event procedure?

  • Thread starter Thread starter David
  • Start date Start date
D

David

I need to move several controls around and I want to use
the existing event procedures.
(I'm creating a tabbed form from a regular form)
It wont let me name the controls the same and so use the
same event procedures so I need to delete the old
controls. But I dont want to lose the event procedures as
to rewrite them would be a huge burden.
Will deleting the controls, delete the event procedures???
 
Create new controls first, name them the way you want and then in the
form module in VBA editor change the names of the event functions to
reflect the new names. Then, delete the old controls.
Have you tried copy - paste? I forget if that copies the event
procedures too, but it may.

Pavel
 
I need to move several controls around and I want to use
the existing event procedures.
(I'm creating a tabbed form from a regular form)
It wont let me name the controls the same and so use the
same event procedures so I need to delete the old
controls. But I dont want to lose the event procedures as
to rewrite them would be a huge burden.
Will deleting the controls, delete the event procedures???

No. You can safely cut and paste your controls into the desired tab pages
without worry that your code will be lost. Even when deleting controls
permanently, you must remove the event procedures manually as they are not
removed with the controls.
 
Back
Top