+ Reply to Thread
Results 1 to 3 of 3

BeforeSave Crashes Excel

  1. #1
    Registered User
    Join Date
    01-03-2005
    Posts
    35

    BeforeSave Crashes Excel

    Hi,

    I'm trying to add a macro that when the user tries to save, forces them to use a certain file name.

    What I'm trying to achieve is:
    - get file name from cells in spreadsheet (picks up month and version number)
    - prompt user to make sure they've updated the version number.
    - If not, allow them to cancel save
    - If yes, save the file with the appropriate month and version number



    Please Login or Register  to view this content.
    The problem is that everything runs fine without that last line. As soon as I add the line, it causes Excel to crash. I know I'm missing something really obvious. Any ideas?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: BeforeSave Crashes Excel

    Try:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-03-2005
    Posts
    35

    Re: BeforeSave Crashes Excel

    Thanks zbor, I gave that a go and it still didn't work. So I've stripped right back to basics and got rid of everything other than the following:
    Please Login or Register  to view this content.
    It saves the file with the correct file name, but crashes Excel

    I think it's because I'm trying to save within beforesave, thus creating some kind of loop...so what I really need to do is pass the filename to the inbuilt save

    ---------- Post added at 08:08 AM ---------- Previous post was at 08:01 AM ----------

    So, just to prove that saying the problem out loud (or at least on the Internet) can be the thing that fixes it, I've sorted it:
    Please Login or Register  to view this content.
    Last edited by grey; 08-29-2012 at 03:05 AM.

+ 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