disabling userform in form

KD12

New Member
Joined
Jan 22, 2003
Messages
20
Hi all,

I have a question. I currently have a template with numerous macros and 1 userform. I have the userform set up to show as soon as the template is opened. The user then inputs various info and hits the okay button to populate the template. They then click a button on a customized toolbar that runs a macro to save the form under a different name(using values from certain cells). All of this works fine. My problem is, in the new form they create, the userform shows up and depopulates the cells of the worksheet. Is there a way to either 1)disable the userform during the before-save phase so it won't show up or 2)modify the userform so it won't erase cell values if no new cell values are added? If additional code is needed, where would I put it?


Thanks,
Kim
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
You could try copying the sheet to a new workbook and saving that. Then your UserForm won't be in the copy.
 
Upvote 0
That really isn't realistic for me. We have hundreds of sheets created off this template. I'm just having a lot of problems with users accidently erasing all the cell values. I am trying to make the template as user friendly as possible.
 
Upvote 0
Well you could either:

1. Populate the controls on the UserForm with the current values before you show it, or

2. Test that all the controls are filled in before updating the existing values.

I assume you are comfortable with the coding.

Whatever you do will not take effect in your existing copies.
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,797
Members
449,337
Latest member
BBV123

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