Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I created an Excel user form and renamed it to "frmFormA". I want the user form to show when I open the workbook. I use the following code in the "ThisWorkbook" section of Microsoft Excel Objects in Visual Basic: Private Sub loadWb() Load UserForm1 UserForm1.Show End Sub I also tried to change the code to "frmFormA" in place of "UserForm1" in the code. For some reason, none of them works. Can someone help me with my problem? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you need to put it in the workbook_open event
Private Sub Workbook_Open() Load frmFormA frmFormA.Show End Sub -- -John Please rate when your question is answered to help us and others know what is helpful. "AccessHelp" wrote: Hi, I created an Excel user form and renamed it to "frmFormA". I want the user form to show when I open the workbook. I use the following code in the "ThisWorkbook" section of Microsoft Excel Objects in Visual Basic: Private Sub loadWb() Load UserForm1 UserForm1.Show End Sub I also tried to change the code to "frmFormA" in place of "UserForm1" in the code. For some reason, none of them works. Can someone help me with my problem? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi there
if you put the code below in the "ThisWorkbook" module it should work for you, you need to put the code in the workbook open event for it to run when the workbook opens. you can select from the built in events for an object by using the two comboboxes at the top of the code pane. Private Sub Workbook_Open() frmFormA.Show vbModal End Sub hope this helps you out Steve |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi guys,
Thanks for your helps. They work perfectly. "Incidental" wrote: hi there if you put the code below in the "ThisWorkbook" module it should work for you, you need to put the code in the workbook open event for it to run when the workbook opens. you can select from the built in events for an object by using the two comboboxes at the top of the code pane. Private Sub Workbook_Open() frmFormA.Show vbModal End Sub hope this helps you out Steve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problems loading user form | Excel Programming | |||
Transfer data to form from Excel range upon loading of form. | Excel Programming | |||
Loading a calendar (user form) from another project (personal.xls) | Excel Programming | |||
Loading Excel Data into a Form | Excel Programming | |||
Auto loading of a user form sometimes | Excel Programming |