Jim has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Excel VBA Advanced course
VBA User Forms automaically showing in a spreadsheet
How do I get a User Form to automatically appear when the spreadsheet opens? I currently have to open the Visual Basic Editor and run from there.
I want to eliminate this step for the end users.
Many Thanks in Advance
RE: VBA User Forms automaically showing in a spreadsheet
Hi Jim
Thanks for your question
You need to use the workbook's open event to do this. Simply go to your vbe's project explorer and double click on the workbook event.
Above the code window click on the object list (currently it will say "general"), and select "Workbook".In the procedure list to the right of this, select "open".
This will create an open procedure. Any code written in there runs whenever the workbook opens. To open a form called MyForm simply write
MyForm.Show
In this procedure to open the form automatically when the workbook opens
Regards
Stephen