Thread: Save Message
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
maperalia maperalia is offline
external usenet poster
 
Posts: 258
Default 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