+ Reply to Thread
Results 1 to 3 of 3

Restoring Save functions after Workbook_BeforeSave

  1. #1
    Registered User
    Join Date
    10-25-2007
    Location
    Melbourne, Australia
    Posts
    27

    Cannot save from Task bar after saving from macro

    I have created a workbook that is used by a team as a template. It should be opened and then saved with a new name to a new location. To protect the “master” file the routine provides a filename constructed from key cells in the workbook when saving for the first time. The file saving works fine but when I next try the ‘Save’ or ‘Save As’ functions from the Menu or Task bars, they are disabled.
    I tried adding in the ‘EndOfSub:’ block the line “Cancel=False”, thinking this would turn on the ‘Save’ dialog, but Excel hangs, then shuts down.
    Can anyone please offer any insight to my problem?
    Thanks in advance.

    Please Login or Register  to view this content.
    Last edited by jagman; 10-29-2007 at 04:44 PM. Reason: No answers received

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi jagman,

    Welcome to the forum. In the future please wrap all VBA code in your posts by clicking on the # symbol in the text editor.

    I've done it for you this time, but future posts may be deleted. Please review the forum rules for posting. (Link in my signature)

    Thanks!

  3. #3
    Registered User
    Join Date
    10-25-2007
    Location
    Melbourne, Australia
    Posts
    27

    Excel crashes with "Save As" from macro

    Thanks Paul, for your helpful treatment of a newcomer. I now understand what it is to "wrap" code.
    I assigned the macro code to a button in order to bypass the BeforeSave event and Excel still crashed. Therefore, there must be another issue I have no clue about.
    My "NewFileName" is a concatenated text string built from nine cells and can easily be over 150 characters long.
    Can anyone tell me if there are restrictions on how file names are put together and used that may be causing my problems? Some saves have been successful with the same text string, though.
    Thanks for your time and assistance.

+ 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