VBA Open a Form upon Startup

  • Thread starter Thread starter nathandaviesuk
  • Start date Start date
N

nathandaviesuk

I have other users, using an excel spreadsheet that I have created, bu
when they first open this spreadsheet I want a message box / Form t
appear straight away.

I have already created the form.

Any help appreciated.

Thank
 
In VBA double click on "ThisWorkbook"
Change the dropdown box at the top from "(General)" to "Workbook"
Change the other dropdown to "Open"

Then:

Private Sub Workbook_Open()
UserForm1.Show
End Sub

Change userform1 to whatever your form is

Alternitivly, you could always use msgbox

Private Sub Workbook_Open()
MsgBox "some text here"
End Sub

hope this help
 

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

Back
Top