Corrupted Form: On Load, On Open, and every button produces error - "Member already exists"

AlexB123

Board Regular
Joined
Dec 19, 2014
Messages
207
Hi all,

I'm trying to implement changes I have designed and tested in copy of my production database. I thought I was finished, but during testing, when I tried to call the form from another form, I began to receive the message "The expression On Open you entered as the event property setting produced the following error: Member already exists in an object module from which the object derives."

I checked out several existing threads, and tried everything. I saved the form in Notepad, turned "Has Module" property to "False", then repasted the code, I compacted and repaired the db, and then I pasted sub by sub the entire form back and rebuilt the form. When I tried that approach, the form would open once I left out Form_Load, Form_Open, and Form_Unload. However, any button on the form then produced the same error... "The expression On Click ...".

I've compared all the form properties to my testing database form, I've combed through the VBE for extra copies of the code ...

What else can I do?

Any suggestions appreciated!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I've had this happen a couple of times where the issue was with the database, not the form. What I had to do was copy the code for each form to notepad, copy all of the modules to Notepad, save the forms without a module and them import everything EXCEPT the modules into a new database. Then copy all of the code back in from NotePad. It's not a fast process (sorry) but it has fixed errors for me before.
 
Upvote 0
I'm not sure what the problem was ... specifically. I ended up going through the code for every single form and running "compile project" in the VBEditor. I also did several compact repairs, and the problem seems to be resolved.

Thanks everyone!
 
Upvote 0
Okay. That good. Probably just a minor hiccup then (although of the type that probably cost you a few dozens hairs from your head).
 
Upvote 0

Forum statistics

Threads
1,213,506
Messages
6,114,025
Members
448,543
Latest member
MartinLarkin

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