Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save Message
Could you please help me!!!!!!!!!!!. I have been having difficulties in this
matter I have two macros. One call "Sub ClearContens" (program to clear contens in the form). The other one is call "Sub SaveFile" (to save the form in specific path.). However, I have noticed that sometime I click the macro "Sub ClearContents" before I click the macro "Sub Save File". Therefore, I lost the data and I have to start over again. I wonder if there is a way to connect both macros and tell me through window message that "The file has not been saved yet" when I click the macro "Sub ClearContents" accidentally. Thanks in advance. Maperalia |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save Message
Sub ClearContents()
If thisworkbook.Saved = False then msgbox "Hasn't been saved" exit sub ' or 'SaveFile End if ' current code End Sub -- Regards, Tom Ogilvy "maperalia" wrote in message ... Could you please help me!!!!!!!!!!!. I have been having difficulties in this matter I have two macros. One call "Sub ClearContens" (program to clear contens in the form). The other one is call "Sub SaveFile" (to save the form in specific path.). However, I have noticed that sometime I click the macro "Sub ClearContents" before I click the macro "Sub Save File". Therefore, I lost the data and I have to start over again. I wonder if there is a way to connect both macros and tell me through window message that "The file has not been saved yet" when I click the macro "Sub ClearContents" accidentally. Thanks in advance. Maperalia |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save Message
Tom;
Thank you very much!!!!!. It is running very well!!!!!! I really appreciate it Best regards. Maperalia "Tom Ogilvy" wrote: Sub ClearContents() If thisworkbook.Saved = False then msgbox "Hasn't been saved" exit sub ' or 'SaveFile End if ' current code End Sub -- Regards, Tom Ogilvy "maperalia" wrote in message ... Could you please help me!!!!!!!!!!!. I have been having difficulties in this matter I have two macros. One call "Sub ClearContens" (program to clear contens in the form). The other one is call "Sub SaveFile" (to save the form in specific path.). However, I have noticed that sometime I click the macro "Sub ClearContents" before I click the macro "Sub Save File". Therefore, I lost the data and I have to start over again. I wonder if there is a way to connect both macros and tell me through window message that "The file has not been saved yet" when I click the macro "Sub ClearContents" accidentally. Thanks in advance. Maperalia |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Prompt to Save Message | Excel Discussion (Misc queries) | |||
Macro to Save without the Save Message | Excel Discussion (Misc queries) | |||
Message box before save | Excel Programming | |||
How to save file without the save message? | Excel Programming | |||
save on exit message box | Excel Programming |