Userform1.Show error

PATSYS

Well-known Member
Joined
Mar 12, 2006
Messages
1,750
I have a userform, UserForm1.

In a module, I have the code:

Code:
Sub testform()
UserForm1.Show
End Sub

When I initially ran the testform sub, the userform shows which is fine.

However, the moment I make some changes to the userform (e.g. I added labels, textboxes, etc), I can not run the test form sub. I keep getting debug error and it points to the

Code:
UserForm1.Show

And when I click on reset button, it takes me to the userform1 - but al the changes I made were discarded althuogh I saved those changes before I ran the testform sub.

Why is this happening and what do I need to do save my changes and enable the sub to run?

Thanks
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
If you get an error on that line, you probably have an error in the code in your userform. When you get the error, try pressing f8 to step through the userform code.
 
Upvote 0
Hi Rory,

Thanks for your reply.

I do not have any code in my userform.

When I followed your advice (press F8) it only takes me back to the userform.

And all the changes I made were once again gone.

Is it not possible to make changes to userform?

Thanks
 
Last edited:
Upvote 0
It's possible that you have a reference error. Open tools, references and look at the checked items for one that has an error, and uncheck it.
 
Upvote 0

Forum statistics

Threads
1,221,501
Messages
6,160,175
Members
451,629
Latest member
MNexcelguy19

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