Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying a Userform
Hi, sorry if this is an obvious question but I can't work it out.
I've created a userform that wants displaying on a worksheet as default, how do I make it display? I don't want it to appear when the user presses a button or anything, it just needs to be on the sheet all the time. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying a Userform
I think it might work if you enter the userform.show(false) command in
the workbook, open module. In VBA go to the project explorer and double click on the 'this workbook', when the module opens, click on the drop boxes at the top and change them to read workbook an open, repectively. Enter the text NAMEOFMYUSERFORM.show(false) in this place. Everytime the workbook opens, this code runs, the (false) bit means that you can click on other things, such as cells or other features without closing your form first. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying a Userform
Thanks, I'm now getting an error when I load the workbook:
"Compile Error: Wrong number of arguments or invalid property assignment." The line "Private Sub Workbook_Open()" is highlighted when I click OK, this line was automatically added by Excel when I entered the line you asked me to try. Here's the code: Private Sub Workbook_Open() UserForm1.Show (False) End Sub The above code is displayed with the dropdowns showing as Workbook and Open, there's no "Read Workbook" or "Open Macro" options, I'm using Excel 97 if that makes a difference. Thanks again! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying a Userform
Private Sub Workbook_Open() Userform1.Show End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "David" wrote in message ps.com... Hi, sorry if this is an obvious question but I can't work it out. I've created a userform that wants displaying on a worksheet as default, how do I make it display? I don't want it to appear when the user presses a button or anything, it just needs to be on the sheet all the time. Thanks. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying a Userform
Thanks both of you it's now working! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform for displaying values from a row | Excel Programming | |||
Userform for displaying values from a row | Excel Discussion (Misc queries) | |||
Displaying one userform from another | Excel Programming | |||
PROBLEM DISPLAYING USERFORM | Excel Programming | |||
displaying picture in a userform | Excel Programming |