+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] Save Message

  1. #1
    maperalia
    Guest

    [SOLVED] 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. #2
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    maperalia
    Guest

    Re: 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" <[email protected]> wrote in message
    > news:[email protected]...
    > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1