Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling VBA user form as soon as excell file is opened 1

Status
Not open for further replies.

unforgiven

Technical User
Dec 27, 2002
7
US
Hello I'm usally a VB programmer, but i've been asked to create a VBA interface for a existing spreadsheet. I've got interface stuff down. My question is how do I call or make my vba userform open automaticaly as soon the file is opened. The VBA userform should be open and the excell sheet should be in the background. Any help would be greatly appreciated.
 
Open the Visual Basic Editor (Alt+F11) and write this :

Private Sub Workbook_Open()
UserForm1.Show
End Sub

where UserForm1 is the name of your form. That's it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top