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
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
![]()
Please Login or Register to view this content.
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
>
Worked like a charm! Thanks!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks