+ Reply to Thread
Results 1 to 6 of 6

Before Save event macro

  1. #1
    Registered User
    Join Date
    06-23-2005
    Posts
    86

    Before Save event macro

    Can anyone help please

    I need a before save event macro in excel that will check if sheet1 cell ref A25 = zero.

    If it isnt zero I want a msgbox to say "Does Not Equal Zero" to pop up, if it is zero then I do not want a msgbox displayed.

    In both instances I still want the file to be saved.

    Can anyone help me please?

    Thanks
    CD
    Last edited by certain_death; 07-08-2009 at 10:07 AM. Reason: Solved

  2. #2
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Before Save event macro

    I have presumed that by "A25 = zero", you mean "A25 = 0", ie. the numeric, not the text.
    Also it is checking cell A25 of the first worksheet.
    The code below should do as you wish.

    Please Login or Register  to view this content.
    If you find the response helpful please click the scales in the blue bar above and rate it
    If you don't like the response, don't bother with the scales, they are not for you

  3. #3
    Registered User
    Join Date
    06-23-2005
    Posts
    86

    Re: Before Save event macro

    Hi Phil

    Thats great.

    Thanks so much for your help.

    Cheers
    CD

  4. #4
    Registered User
    Join Date
    06-23-2005
    Posts
    86

    Re: Before Save event macro

    Hi

    Just noticed that the variance could possibly be a positive or negative value and could also be 1.000000000003 (eg) which I would be happy with.

    Is there any way you could put if the variance is between 2.00 and -2.00 do nothing, if not display msgbox.

    Thanks
    CD

  5. #5
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Before Save event macro

    Change this section:
    Please Login or Register  to view this content.
    To be:
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-23-2005
    Posts
    86

    Re: Before Save event macro

    Thanks Phil

    This is great

    Cheers again.

+ 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