+ Reply to Thread
Results 1 to 5 of 5

Macro Crash, Compile Problem

  1. #1
    Registered User
    Join Date
    01-16-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    14

    Macro Crash, Compile Problem

    I have a rather lengthy macro. I understand the xlsb may be saved with a poor compile. This causes the macro to crash open opening.

    The dance is - set security to not allow macros, open buggy xlsb, compile thru vba editor-debug, save/close , set security to allow, open xls and run.

    This works, albeit the correction 'dance' takes a few minutes.

    What I don't understand -

    I purposely re-compile the macro prior to saving. Thus the xlsb is saved in allegedly error free state.

    What happens after saving that is causing the xlsb macro to become 'de' compiled?

    I've used the macro for about three years. 3-4 times I've taken the vba out and saved in macro free fashion. Then with clean xlsx I've added the vba back in. This has been done to 'clean' the code.

    Thanks beforehand.

  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

    Re: Macro Crash, Compile Problem

    Hello Adison,

    I suspect you have migrated this macro from an older version of Office to a new version.

    You need to tell us which versions of Office you are using (old and new) and post the macro code.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Macro Crash, Compile Problem

    Thanks for the response.

    a) The version created in was 2010. Currently running 2013.
    b) The code is over 1000 lines.

    I was anticipating a logical answer without specifics.

    The question being, how can a xlsb be saved with no compile errors. But open opening, crashes because of compile errors???

    Thanks again.

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

    Re: Macro Crash, Compile Problem

    Hello Adison,

    What you have tried has failed to correct the problem. There is some other reason for the corruption.

    The logical suspect is the macro code. But without seeing the code there is no real way to tell why the corruption is happening and without knowing why it is happening, there is no way to prevent it.

    I have no interest in isolating such a problem in a 1000+ lines of code.

    You have quite a lot of work to do in isolating this problem.

  5. #5
    Registered User
    Join Date
    01-16-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    14

    Re: Macro Crash, Compile Problem

    Thanks for the help. I agree, isolating a code error would be difficult.

    I guess I am interested in knowing how a file becomes de-compiled after it is saved compiled.

    Today it ran fine... go figure.

+ 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. Help with vba macro crash
    By Durarara in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-02-2012, 07:01 PM
  2. Chronic Crash problem
    By Jordan Kidd in forum Excel General
    Replies: 0
    Last Post: 07-28-2010, 04:04 PM
  3. Excel crash - bug macro?
    By al007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2005, 06:55 AM
  4. Excel VBA macro crash
    By Patrick in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-13-2005, 11:05 AM
  5. [SOLVED] Path\File name length problem Excel Crash on save as
    By Datasort in forum Excel General
    Replies: 0
    Last Post: 04-08-2005, 01:06 PM

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