+ Reply to Thread
Results 1 to 3 of 3

Aftersave event - boolean issue

  1. #1
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Aftersave event - boolean issue

    Hi all,

    Can anyone explain why my code isn't working below? Upon the first instance of the user clicking 'Save' I want a MsgBox to appear. All subsequent saves this should then not appear. I thought the below code would do it:

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Amsterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    186

    Re: Aftersave event - boolean issue

    Hi DNL

    The event will trigger, every time a user clicks on Save.
    To pass the value from SavedAlready to the next time the sub runs you can declare it as Public variable (outside your sub).
    And make sure A1 is > 0.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-23-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    404

    Re: Aftersave event - boolean issue

    I'd missed the Public off my declaration! Thank you!

    Sometimes it's the small things huh!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Aftersave event - fixed range of cells
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-25-2014, 08:37 AM
  2. [SOLVED] Misbehaving alerts when using AfterSave
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-27-2014, 10:16 AM
  3. aftersave event - problem - ignored on office 2007
    By kmeld in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2014, 11:19 AM
  4. having problems with Workbook AfterSave vba code
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2013, 11:04 AM
  5. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) problem
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2009, 07:28 PM

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