+ Reply to Thread
Results 1 to 4 of 4

MsgBox Help

  1. #1
    Registered User
    Join Date
    02-24-2006
    Posts
    2

    MsgBox Help

    How can I program a MsgBox to pop up every time the program is opened? I want 2 to have 2 buttons, "yes" and "no". Yes lets you access the spreadsheet, clicking no will not let you access the sheet. Thanks for your help!

    Zach

  2. #2
    Forum Contributor
    Join Date
    01-19-2006
    Posts
    142
    Please Login or Register  to view this content.

  3. #3
    Bob Phillips
    Guest

    Re: MsgBox Help

    Private Sub Workbook_Open()
    If MsgBox("Yes or No ", vbYesNo) = vbYes Then
    'do something
    End If

    End Sub

    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Zach H" <Zach.H.23qj6y_1140786901.5624@excelforum-nospam.com> wrote in
    message news:Zach.H.23qj6y_1140786901.5624@excelforum-nospam.com...
    >
    > How can I program a MsgBox to pop up every time the program is opened? I
    > want 2 to have 2 buttons, "yes" and "no". Yes lets you access the
    > spreadsheet, clicking no will not let you access the sheet. Thanks for
    > your help!
    >
    > Zach
    >
    >
    > --
    > Zach H
    > ------------------------------------------------------------------------
    > Zach H's Profile:

    http://www.excelforum.com/member.php...o&userid=31888
    > View this thread: http://www.excelforum.com/showthread...hreadid=516160
    >




  4. #4
    Registered User
    Join Date
    02-24-2006
    Posts
    2
    Worked like a charm! Thanks!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1