VBA Editor question

Hap

Well-known Member
Joined
Jul 20, 2005
Messages
647
Typically when creating a form, when I add a control to the form and doubleclick I am automatically taken to the form module code and a default control event is created.

When I go back to make modifications to the form at a later date by adding controls, if I choose to doubleclick the control, the editor is not automatically creating the default control event. I'm assuming this means that the editor is not recognizing the control. Most of the time if I save the file and exit excel altogether when I reopen the file the editor will recognize the new control. Lately Excel is showing instability when I add controls to a form this way. By instability I mean that Excel is crashing completely when trying to open these files.

I could use some enlightenment as to what is happening. I'm assuming I need to change a programming practice.

Thank you for any help in explaining this
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
What version of Excel are you using?

I've found that Excel 2004 and 2011 get added stability if you save the file immediately after adding any controls.
 
Upvote 0
As an FYI; the best way around this instability that I've found is to export the form module from my original workbook and remove it.

Import the form into a new workbook and modify the form controls there.

Export the form from the new workbook.

Import the form back into the original workbook.

Its a process but I haven't had any stability issues doing it this way so far.
 
Upvote 0

Forum statistics

Threads
1,223,196
Messages
6,170,662
Members
452,345
Latest member
ye4hb0i

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top