Starting a 'floating' form once a spreadsheet is open

D

den1s

Hi,

I have created a form which gives the user an option of selecting the
source file for generating a spreadsheet. The form was created in
Excel's VBA interface.

Is there anyway I can get the form to automatically appear as soon as
the excel spreadsheet is open? At the moment, the user needs to go into
the VBA interface select the form and click 'run' before the form
appears on the spreadsheet. I would like the form to simply appear as
soon as the spreadhseet is open.

- K
 
D

davesexcel

Private Sub Workbook_Open()
UserForm1.Show
End Sub
this goes into a workbook module

click on the xl icon beside the file menu
choose view codes
in the dropdown menu that reads general select workbook
enter the above code that shows the userform
if your userform is not called UserForm1
then enter the name of the userform you want to show at startup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top