+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Workbook_beforeSave won't run

  1. #1
    Registered User
    Join Date
    01-13-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    10

    Question Workbook_beforeSave won't run

    Hello, I'm new to this board. i just signed up today and quickly I found what I needed VBA code that would add the date modified of the current file to cells. Here's the code I got:

    Please Login or Register  to view this content.
    It worked wonders at first, and even everytime I would hit save the time would update. I closed the file and came back to it later and now the code won't update the time when I hit save. i verifyied that the code is there, i can see it, but it doesn't work anymore.

    Please help

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,444

    Re: Workbook_beforeSave won't run

    Do you have macros enabled?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    01-13-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Workbook_beforeSave won't run

    I am using the XLSM format. and i have "Disable all macros except digitally signed macros" selected.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,444

    Re: Workbook_beforeSave won't run

    So I assume your workbook is digital signed then.

  5. #5
    Registered User
    Join Date
    01-13-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Workbook_beforeSave won't run

    I do not have a digital signature. And you are right if i check "Enable all macros (not recommended; potentially dangerous code can run) it works. However i was tring to avoid enabling all macros in case i encounter malicious worksheets.

    thanks for your help.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Workbook_beforeSave won't run

    The setting you want is Disable all macros with notification. Then you'll have the opportunity to enable macros.

    Or you can create your own certificate, and sign your projects for your own use.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    01-13-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Workbook_beforeSave won't run

    Thank you, the Disable all macros with notification is what i need to use. Thanks for taking the time to reply to what, looking back, seems like a real obvious question and answer. whoops.

+ 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