Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple meassage box
Could someone tell me how to have a message box pop up when someone opens a
file. The message box should have 'yes' and 'no' buttons and should be asking you to check you are in the correct spreadsheet. If 'yes' is selected then continue on to edit the sheet, if 'no' is selected, then close Excel. Any help is greatly appreciated. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple meassage box
In the workbook to be opened, add
Private Sub Workbook_Open() If MsgBox("question", vbYesNo) = vbNo Then Application.Quit 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 (there's no email, no snail mail, but somewhere should be gmail in my addy) "Les" wrote in message ... Could someone tell me how to have a message box pop up when someone opens a file. The message box should have 'yes' and 'no' buttons and should be asking you to check you are in the correct spreadsheet. If 'yes' is selected then continue on to edit the sheet, if 'no' is selected, then close Excel. Any help is greatly appreciated. Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple meassage box
Cheers Bob
Exactly what I needed. Regards Les. "Bob Phillips" wrote: In the workbook to be opened, add Private Sub Workbook_Open() If MsgBox("question", vbYesNo) = vbNo Then Application.Quit 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 (there's no email, no snail mail, but somewhere should be gmail in my addy) "Les" wrote in message ... Could someone tell me how to have a message box pop up when someone opens a file. The message box should have 'yes' and 'no' buttons and should be asking you to check you are in the correct spreadsheet. If 'yes' is selected then continue on to edit the sheet, if 'no' is selected, then close Excel. Any help is greatly appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Can I add a Warning Meassage to a Macros Designed to Delete a Row | Excel Worksheet Functions | |||
Make it more simple or intuitive to do simple things | Charts and Charting in Excel |