+ Reply to Thread
Results 1 to 18 of 18

Can't save macro

  1. #1
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Can't save macro

    I've recorded a macro with the recorder and it runs correctly before I save the worksheet. After saving, I close the worksheet, then open it up again from disk. At this point I find the recorded Macro isn't in the file, and of course, doesn't work. I used the default name of Macro1, to be saved in "This worksheet". If I start to re-record the macro the default macro name iterates to Macro2.

    What's happening. I've only got the one file "Loadings.xls" with no duplicates anywhere.

    Help!
    Last edited by LonnieP; 10-01-2010 at 11:12 AM.

  2. #2
    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: Can't save macro

    Are you indeed using Excel 2003?

    Where did you look for the macro?

    If you do Alt+F8, the macro name does not appear?
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    Yep, it's 2003 and I used ALT-F8 to open the macro editor and the macro list is blank. When I open older sheets/workbooks and do the same thing to open the macro recorder, the macros are still there.

  4. #4
    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: Can't save macro

    And you are saving the workbook as an xls, not a csv, htm, ...?

  5. #5
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    Using "Save as" and saying yes to the overwrite prompt.

  6. #6
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    Just tried to save a simple worksheet with a simple macro with the name of Macro1, to be saved in "This worksheet". Saved, closed, reopened and the macro was gone. A re-record prompted new macro as Macro2.

  7. #7
    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: Can't save macro

    a simple macro with the name of Macro1, to be saved in "This worksheet"
    ThisWorkbook

    Just happens in one particular workbook?

  8. #8
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    No, any new workbook on this machine does it now. Just tried it on the secretaries machine and all worked as it should. Right now I'm thinking a re-install of Office may be in order. Is there some kind of global reset to factory defaults I can try first.

  9. #9
    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: Can't save macro

    Try Detect & Repair first.

  10. #10
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    Never heard of it. What and where is it?

  11. #11
    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: Can't save macro

    Help menu.

  12. #12
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    Well, Heck!

    Just went back to the secretaries machine with the troubled file, opened it up, forced a blank row into the top of the screen, re-recorded the macro under a new name, made sure it was saved in "This workbook" saved the file, closed the file, opened the file, and all seems right with the world.

    Kind of like fixing your car when you were a kid. Tear it down, don't replace anything, put it back together, and it's fixed now. Don't know what you did, but it works now.

    Waiting for the other shoe to drop now. Keeping my fingers crossed.

    Thanks for the help!

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Can't save macro

    Were you saving your macro to PERSONAL.xls?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  14. #14
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    Roy, no, the macro has to be saved in "This workbook".

    I'm building a modular worksheet suite with each module having five macros designed to manipulate each specific module. I've got thirty modules which would yield 150 macro names if all kept in one place. Too many to remember and disaster if you triggered the wrong one. Remember, no "undo's" for macro's, unless you save first. Hmmm, maybe save to a temp file first, a poor man's undo.

    LonnieP

  15. #15
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Can't save macro

    I said was the macro saved to PERONAL.xls, not that you should save it there

  16. #16
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    Sorry Roy, I guess I'm missing something here. When macros are saved to "This Workbook", doesn't that mean the currently open/active workbook, which in this case is "loadings.xls". I just assumed "Personal.xls" is keyed to the Log-in user and is one of the lookup locations for macros of unspecified file location. Kind of like the old DOS search path.

    Your comment sounds like I got that wrong.

  17. #17
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Can't save macro

    When you record a macro you choose the location. If you forgot to change it to Thisworkbook then it may have been saved in a new workbook which you didn't save or personal.xls

  18. #18
    Registered User
    Join Date
    02-25-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Can't save macro

    Could very well be what happened.

    Thanks

+ 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