98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA User Forms automaically showing in a spreadsheet
VBA User Forms automaically showing in a spreadsheet
Resolved · Medium Priority · Version 2003
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
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Sorting data stored in rowsPrimarily Excel is set up to sort data that is stored in columns rather than rows. |