![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 01:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com