Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How can I program a MsgBox to pop up every time the program is opened? want 2 to have 2 buttons, "yes" and "no". Yes lets you access th spreadsheet, clicking no will not let you access the sheet. Thanks fo your help! Zac -- Zach ----------------------------------------------------------------------- Zach H's Profile: http://www.excelforum.com/member.php...fo&userid=3188 View this thread: http://www.excelforum.com/showthread.php?threadid=51616 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Code ------------------- Private Sub Workbook_Open() msg = MsgBox("Access the Spreadsheet?", vbYesNo) If msg = vbYes Then Sheets("Sheet1").Activate else ' closes the active workbook without saving any changes ActiveWorkbook.Close False end if End Sub ------------------- -- gti_jober ----------------------------------------------------------------------- gti_jobert's Profile: http://www.excelforum.com/member.php...fo&userid=3063 View this thread: http://www.excelforum.com/showthread.php?threadid=51616 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Worked like a charm! Thanks!! -- 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 |