Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prompt to Save Message Adam O Excel Discussion (Misc queries) 2 December 10th 08 08:22 PM
Macro to Save without the Save Message Ellen G Excel Discussion (Misc queries) 4 February 23rd 07 08:52 PM
Message box before save Chance224 Excel Programming 1 March 15th 05 05:25 PM
How to save file without the save message? Together[_3_] Excel Programming 5 March 1st 04 04:41 PM
save on exit message box Olly[_3_] Excel Programming 0 November 7th 03 03:37 PM


All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"