ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do you display a VBA user form when starting excel workbook? (https://www.excelbanter.com/excel-programming/329290-how-do-you-display-vba-user-form-when-starting-excel-workbook.html)

Dant

How do you display a VBA user form when starting excel workbook?
 
How do you display a VBA user form when starting excel workbook? Code works
to populate a list box based on choice in previous list box but how do you
show the form so that it can be used when you start excel? I want to make it
an excel form to collect data that has interdependanrt fields.

Howard Kaikow

How do you display a VBA user form when starting excel workbook?
 
1 way is to start the userform from an autoopen macro.

--
http://www.standards.com/; See Howard Kaikow's web site.
"dant" wrote in message
...
How do you display a VBA user form when starting excel workbook? Code

works
to populate a list box based on choice in previous list box but how do you
show the form so that it can be used when you start excel? I want to make

it
an excel form to collect data that has interdependanrt fields.




MBlake[_2_]

How do you display a VBA user form when starting excel workbook?
 
Open your VBE window (Alt+F11)
Ensure your Project Window is open (View - Project Explorer)
Click on the 'This Workbook' for your Excel file

Add code but substitute MyForm for the name of your userform.

' Opens userform at startup
'
Private Sub Workbook_Open()
frmMyForm.Show
End Sub

Regards,
Mickey



Tom Ogilvy

How do you display a VBA user form when starting excel workbook?
 
Additional information:

http://www.cpearson.com/excel/events.htm
Chip Pearson's overview page on events.
--
Regards,
Tom Ogilvy

"dant" wrote in message
...
How do you display a VBA user form when starting excel workbook? Code

works
to populate a list box based on choice in previous list box but how do you
show the form so that it can be used when you start excel? I want to make

it
an excel form to collect data that has interdependanrt fields.





All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com