VBA: Show or load a form when Excel starts
If you would like to load a form or run some VBA code when you open an excel workbook, place your code in the Thisworkbook code window and in the Workbook_Open sub.
From your spreadsheet:
1. Press ALT and F11 to open the VB editor
2. Double-click the word ThisWorkbook to open the code window
3. Type the following code in the ThisWorkbook code window
Private Sub Workbook_Open() UserForm1.Show End Sub
Sidenote: Replace Userform1 with your form name
4. Close Excel and re-open.

Can't get the tutorial to work for you? Need help with your code?
Get answers right away at our AE Excel Support Forums!
Get answers right away at our AE Excel Support Forums!



thanks for the tips
great advice thanks a lot!
easy to learn, tool is powerful
Thanks for the tip, it saved me a lot of time…
I have tried this code and it works great from a few computers. However there are a couple of computers at work that when I put the code in for the workbook open() it has given me different errors. I have even tried:
Private Sub Workbook_Open()
On Error Resume Next
Userform1.show
End Sub
Now if I open this spreadsheet up from one of the other computers it works and runs just fine. If I write the code in on one of the other computers (that it runs from) and save it, send it back to the computers I had a problem with and it works, until I try to save something in that spreadsheet from that computer.
Any ideas??