Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Can anyone help me with a piece of code to put in place of "Do something if answer is yes" Here is the code: Private Sub Workbook_BeforeClose(Cancel As Boolean) If MsgBox("Do you want to save as 'Galashiels Resources WC " & Range("N2") & _ "'", vbYesNo + vbInformation, "Galashiels Operational Resources © MN ") = vbYes Then 'Do something if answer is yes End If End Sub I am looking for a command to put in the code to replace: 'Do something if answer is yes, I want this to save a file as the new name e.g Resources WC and the range N2 on the desktop, if no is selected I want the workbook to close and make no changes, can you help with this code. Regards Mark |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SAVE and SAVE AS options disappeared from the drop down FILE menu | Excel Discussion (Misc queries) | |||
Excell2003 (SP-1) File > Save and File > Save As.. grayed out | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions | |||
Excel marcos firing on file save as but not file save | Excel Programming | |||
Save File to Another Directory, but not change Users File Save location | Excel Programming |