+ Reply to Thread
Results 1 to 5 of 5

Recovering a macro from a corrupt excel file

  1. #1
    Registered User
    Join Date
    10-02-2007
    Posts
    12

    Recovering a macro from a corrupt excel file

    Hi,

    I was happily working along on my macro and then lost power to my laptop. Upon booting up and opening the same excel file i received the error stating that my file was too corrupt but excel can try repair it.

    it repaired it however none of the macro's, pivot tables or data formatting exist.

    the file is still the same size.

    Is it possible to extract the Macro's in this situation ?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Mikelever,

    It may be possible, but neither easy nor quick. In the future, name your modules, and export them. That way you can reuse them for other projects later, and also provide a backup your macros.

    To rename a module, select it in the Project Explorer window (Press CTRL+R if it isn't visible). In the Properties window, type in the new name next to (Name). If this window isn't visible press the F4 key. You can use spaces in the name, but underscores are fine. The maximum character length in a name is 31 characters.

    Sincerely,
    Leith Ross

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I've had this in the past and received a message that the VBA Project was lost. I then closed Exceel without saving and the VBA was there next time.
    Hope that helps.

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

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    10-02-2007
    Posts
    12

    no luck

    Hi Guys,

    thanks for that info, unfortunately I still couldnt access the macros.

    Luckily I had a previous version backup. not ideal but I now just need to start over again with this last section.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    If it's not too late open the workbook without enabling macros. Check the VB Editor to see if your macros are available. This has worked for me i the past. If they are drag them to a new workbook.

    What Excel version are you using/

    lesson to be learbed - always back up regularly

+ 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