Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Multiple userform

0

I have 3 userforms which needs to input onto 3 different databases (all in the same workbook). All 3 userforms has "save" , "edit" and "reset" command buttons. I'm gettting a "ambigious name" error for all the codes as they are all following the same process. Is it possible to have 1 userform with a selection box to send the info to the applicable database?

Answer
Discuss

Answers

0

Aletia

You have two Moudules which contain subs with the same name (e.g. Modify), When you say Call Modify, VBA doesn't know which to run so fails.

You can either delete the duplicates or rename them (e.g. Modify1) so they are unique. You'll need to change the call to the modified ones BTW. Also it's better to avoid confusion if you don't name your subs like VBA methods or properties (e.g. Save, Protect) though VBA will let to

Note to that your sub cmdDelete_Click() currrently shows Call DeleteRecord which won't work since your sub is called Delete,

Hope this helps

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login