User Forms

isabelle

New Member
Joined
Oct 22, 2002
Messages
2
Two questions:

1. How can I make sure that numerical entries in a textbox on a user form are recognized as percents?

2. Is there a way to deactivate a user form after it pops up so that one can scroll on the worksheet in the background?

Thx
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
WELCOME TO THE BOARD!

How can I make sure that numerical entries in a textbox on a user form are recognized as percents?

There are a couple of ways to do this. For instance, if the value entered into the TextBox is going to a cell in the spreadsheet, you could do something like this:

Range("A1").Value = TextBox1.Value/100

Then the formatting of cell A1 should be as percentage.

Is there a way to deactivate a user form after it pops up so that one can scroll on the worksheet in the background?

There are two ways to deactivate a UserForm. One of the ways is:

Unload UserForm1

or

Unload Me

Me ALWAYS refers to the current UserForm. This will actually "turn off" the UserForm. Here is another method:

UserForm1.Hide

Or

Me.Hide

This only hides the UserForm rather than "turning it off".

I hope that this helps.
 
Upvote 0
Thanks so much for your help!!! I hope I can ask a little more...so here goes:

How and where would I incorporate the unload code into my macro? Would it be part of the macro that runs behind the user form or do I need it to be invoked by a button on the user form? I just want the user of my program to be able to click back and forth between the user form and the worksheet.

Also, do you know by any chance how I could make sure that data entered into the user form gets saved so that if the user form is called up again it retains the entered data?

Thank you so much, this forum is great! I am going to let some other people know about it, I love it!
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

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