userforms

Donald

Board Regular
Joined
Apr 15, 2002
Messages
138
I created a very simple userform. How do I activate it on the sheet?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
On 2002-08-30 20:09, Donald wrote:
I created a very simple userform. How do I activate it on the sheet?

There is a couple different ways you can have it open when to workbook opens or initiate it with macros or commandbuttons

What is your goal?

Derrick
 
Upvote 0
In a Sub in a sheet module or standard module:

TheUserFormNameHere.Show

like:

UserForm1.Show

Then run the sub. JSW
 
Upvote 0
I want to choose when to activate the useform, such as through a button.

The userform will have a series of print option buttons that the enduser will be able to choose from.

thanks for the assistance
 
Upvote 0
Donald
In the VBE click on Insert.
Click on Module
Click back on Insert
Click on Procedure
Give it a name (No spaces)
Between the name and End Sub type in:
UserForm1.Show (Or if you have changed the name)
Name.Show
Back to the sheet from the Forms toolbar click on the button icon.
Click on the sheet where you want to put it.
Highlight the macro you want to attach it to.
Click off the button.
Right click the button and click on Edit Text
Rename the button
Voila
 
Upvote 0
To be placed in ThisWorkbook:


Private Sub Workbook_BeforePrint(Cancel As Boolean)
VerySimpleUserform.Show
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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