Results 1 to 8 of 8

Thread: Pop up message box when first opening spreadsheet?

  1. #1
    Board Regular
    Join Date
    Feb 2003
    Location
    North Carolina
    Posts
    65
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Pop up message box when first opening spreadsheet?

    Can I create a message box that displays a message when the spreadsheet is first opened?

    If so, where do I put it?

  2. #2
    Board Regular kevin.philips's Avatar
    Join Date
    Jan 2003
    Location
    Plymouth, UK
    Posts
    364
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Add this into a new module:

    Sub Auto_Open
    MsgBox "Put your message here" , vbinformation + vbokonly , "Your Message"
    End Sub

  3. #3
    MrExcel MVP phantom1975's Avatar
    Join Date
    Jun 2002
    Location
    Omaha, Nebraska
    Posts
    3,962
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You will need to put the following in the ThisWorkbook module:

    Private Sub Workbook_Open()
    MsgBox "Hello",vbOkOnly+vbExclamation,"Title for HELLO"
    End Sub
    Silly Billy was here....

    ***************** EXCEL/VB NEWBIES ARE MY FAVORITE! *****************

  4. #4
    Board Regular
    Join Date
    Feb 2003
    Location
    North Carolina
    Posts
    65
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Works great!

    Worked like a charm! Thanks for the information from both of you.

    BTW, like Kevin.Philips said, it doesn't have to go in the Thisworkbook module, I put it in an empty module that I had open and it worked great!

  5. #5
    MrExcel MVP TommyGun's Avatar
    Join Date
    Dec 2002
    Location
    Clear Lake, TX
    Posts
    4,202
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This is true, it will work, but the Auto_Open procedure is the older way of doing what you want. The Worksheet_Open event is the "cleaner" way to do this.

  6. #6
    New Member
    Join Date
    May 2016
    Location
    Surrey, England
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Pop up message box when first opening spreadsheet?

    Quote Originally Posted by phantom1975 View Post
    You will need to put the following in the ThisWorkbook module:

    Private Sub Workbook_Open()
    MsgBox "Hello",vbOkOnly+vbExclamation,"Title for HELLO"
    End Sub

    Thanksforthis

  7. #7
    New Member
    Join Date
    Feb 2017
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Pop up message box when first opening spreadsheet?

    Quote Originally Posted by phantom1975 View Post
    You will need to put the following in the ThisWorkbook module:

    Private Sub Workbook_Open()
    MsgBox "Hello",vbOkOnly+vbExclamation,"Title for HELLO"
    End Sub
    Using this, I get a Compile Error: "Invalid outside procedure"

    Thoughts?

  8. #8
    New Member
    Join Date
    Jun 2015
    Posts
    12
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Pop up message box when first opening spreadsheet?

    Glad I saw this thread. I have a spreadsheet that I have a pop up window with a message which works almost fine.....the message appears, but it stays minimised with the sheet on the taskbar, which isn't always obvious to users, have I created my message incorrectly?

    Any thoughts greatly appreciated!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •