+ Reply to Thread
Results 1 to 9 of 9

Subj: Disappearing macros??

  1. #1
    Registered User
    Join Date
    09-28-2012
    Location
    SF, CA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Unhappy Subj: Disappearing macros??

    After upgrading to a new machine, installing Office, and pasting in a number of Visual Basic macros, they seem to be available on this machine in Excel files only randomly. We have a number of fairly complex macros that we need to run on files pretty often. The new machine

    1) can open files that other users have edited and that have the macros, and then use them itself… but after re-opening later, the same macros are not available.
    2) can create new files that SOMETIMES have the disappearing macros available, though usually not.


    We even tried saving files as .xlsm instead of .xlsx, ("macro-enabled workbook") but that has the same issue: the macros are randomly unavailable. Saving as .xlsx is much more ideal for our group workflow.
    We know how to create the macros again, and we can continually redo this process every time we open any file, but that really shouldn’t be necessary if we can configure this properly.

    Any help with this would be great.

    Running:
    Windows 7, Version 6.1

    Office Pro Plus 2010
    Excel Version 14.0.6112.5000

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,056

    Re: Subj: Disappearing macros??

    If you want macros in Excel 2007 and above, and you want the files in Excel 2007 (and above) format, they MUST be saved as .xlsm macro enabled workbooks. It is not an option. Well, it is; you could also have .xlsb files.

    If anyone saves the files in .xlsx format, they will no longer contain macros.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-28-2012
    Location
    SF, CA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Subj: Disappearing macros??

    Hmm. That is not the case for the other machines in our office, all running Excel 2010. We save files as the default .xlsx and our macros are always there. I do this literally every day.

    But regardless of file type, the problem is identical with .xlsm files. The macros are there.... and then they're not. The problem is independent of file type.
    Last edited by jeff g; 11-06-2013 at 08:52 PM. Reason: unclear

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,056

    Re: Subj: Disappearing macros??

    I can only think that the macros are stored in a personal workbook then. Maybe that's a shared workbook and only one person can access it at any time.

    It's not a problem that I have ever experienced so I don't really know what more to suggest. You should research .xlsx and .xlsm files to understand what you can and cannot do.

    Introduction to new file-name extensions

    Easier detection of documents that contain macros Files that are saved by using the default x suffix (such as .docx, .xlsx, and .pptx) cannot contain Visual Basic for Applications (VBA) macros and XLM macros. Only files with file-name extension that end in an m (such as .docm, .xlsm, and .pptm) can contain macros.


    Regards, TMS

  5. #5
    Registered User
    Join Date
    09-28-2012
    Location
    SF, CA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Subj: Disappearing macros??

    Dear TMS,

    I appreciate you taking the time to respond on this thread, but you actually haven't addressed my problem.

    To clarify further, in our workplace, we save Excel files on a common server and access and edit them individually. Different machines each have a large number of macros saved locally and we run them individually when editing these files.

    The user with the new machine created macros as he had on his previous machine, but it seems to be impossible to save them such that they don't simply disappear later.

    Researching this problem online earlier, I read that .xlsx files are not macro-enabled, while .xlsm files are. Even though the macros have been working fine with all of our .xlsx files for years, now, we've experimented with using .xlsm files instead. But the user with the new machine still has the exact same problem: he can create and save the macros locally, but they are often (though not always!) gone when he reopens the same file later.

    Does this make sense?

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,692

    Re: Subj: Disappearing macros??

    The only other way would be if you have an .xlsm workbook with all the macros in it, for instance called "My Macros.xlsm", and use the macros from that workbook. That workbook, "My Macros.xlsm" needs to be open so you can run them from "Macros in all open workbooks" in the Macro Pop-Up in an .xlsx workbook.
    But this is essentially what TMShucks previously said about the shared workbook.

  7. #7
    Registered User
    Join Date
    11-15-2012
    Location
    australia
    MS-Off Ver
    Excel 2012
    Posts
    33

    Re: Subj: Disappearing macros??

    I agree with everybody above, save it as a xlsm and your problem will be solved.

  8. #8
    Registered User
    Join Date
    09-28-2012
    Location
    SF, CA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Subj: Disappearing macros??

    Hi everyone. It's been almost a year since I posted the above question, that was really baffling me. The key piece of information that I was not understanding, was that the macros my team uses are generally stored in PERSONAL.xlsb. The trick is just to get that file open, and make sure all the macros are there.

    Excel doesn't make this simple, requiring you to "unhide" the file, but then "hide" it again, otherwise it opens everything you use the program. It's resolved now, though. Just in case ya wondered..... :-)

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,056

    Re: Subj: Disappearing macros??

    Thanks for letting us know.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Disappearing Macros/Code in VBA
    By nermal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2012, 12:55 PM
  2. Macros disappearing
    By Mvaldesi in forum Excel General
    Replies: 2
    Last Post: 03-22-2011, 11:57 AM
  3. [SOLVED] Disappearing Macros
    By JCW in forum Excel General
    Replies: 0
    Last Post: 06-21-2006, 04:45 PM
  4. [SOLVED] Disappearing C
    By Stacey in forum Excel General
    Replies: 10
    Last Post: 06-21-2006, 12:00 PM
  5. [SOLVED] Macros keep disappearing
    By OzBushDude in forum Excel General
    Replies: 1
    Last Post: 12-21-2005, 05:00 AM

Tags for this Thread

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