+ Reply to Thread
Results 1 to 6 of 6

Excel 2010 vba project being corrupted

  1. #1
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Excel 2010 vba project being corrupted

    I have an interesting problem where certain .xlsm files keep getting corrupted (not all the time, often a user can go a long time without anything happening). the next time anyone tries to open it they will give the Microsoft excel is not working sort of popup and then we will need to kill excel. This will of course occur every time anyone tries to open the file from then onward.

    I know the issue is related to the VBA project because these files are generally created from templates so I can open them in Zip and copy an old ones vba project into the current file (tip for anyone else who ever has this issue!) and even if it wasn't we have a good backup system so fixing it is trivial from my perspective - however it is annoying to users. I wonder if anyone knows the root cause for these files being corrupted - is it maybe a bad update to excel at some point in time and I need to make sure we have a certain service pack ? Or does anyone have any other ideas?

    FWIW we run excel 2010 SP2 on windows server 2012 R2 V6.3 if that is relevant.

    And it occurs on a variety of files - most have quite a bit of VBA code in them but it isn't a specific file.
    Last edited by scottiex; 01-25-2018 at 06:14 PM.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Excel 2010 vba project being corrupted

    Hello scottiex,

    Is it possible that you may have a lot of Active X Controls, like Buttons, etc. in your Code.? I have found that it could cause such a problem.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Excel 2010 vba project being corrupted

    All of the ones that have had a problem have buttons (actually shapes with macros assigned, which is my habit). So there is a decent chance that contributes to it.

    However it'd be hard (not impossible, but still...) to redesign everything to not have buttons or controls.

    I have also seen a slightly different problems with shapes (and images in excel) before which caused a situation where you cant save the file. To resolve this I have to delete and rebuild the shapes / controls (which I did via code).

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Excel 2010 vba project being corrupted

    When I first installed Office 2016 I had this a lot - the resolve I found was to start a new workbook and import all the forms and modules and code and save that as macro enabled. Seems to have settled the issue as haven't seen for a while now

  5. #5
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: Excel 2010 vba project being corrupted

    Thanks Nigelog that sounds like it is worth a try (pretty straightforward to apply to my templates).

  6. #6
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Excel 2010 vba project being corrupted

    Hi scottiex,

    In addition to the 'Active X' problems mentioned above, there are a couple of subtle string features that may cause corrupt workbooks:
    a. Creating Data Validation using a string:
    Please Login or Register  to view this content.
    Workaround is to put the Data Validation items in a column, and reference the range.


    b. Accessing a string beyond it's boundaries:
    Please Login or Register  to view this content.
    I hope this helps.

    Lewis

+ 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. Replies: 5
    Last Post: 04-01-2016, 02:05 PM
  2. excel 2010 file corrupted
    By popeeric6 in forum Excel General
    Replies: 3
    Last Post: 12-15-2014, 11:58 AM
  3. Excel 2010 - Project Day Allocation, Time Spent Calculation
    By craigj21 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-27-2013, 07:20 AM
  4. Windows 8, Excel 2013 and Project 2010 - Reference Error in Macro
    By microsoftexcel007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2013, 06:23 PM
  5. Macro to export tasks from MS Project to Excel 2010
    By desibabuji in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-26-2012, 01:37 AM
  6. Replies: 3
    Last Post: 02-24-2012, 11:43 AM
  7. Use Calendar (Excel 2007) and the Date Picker (Excel 2010) in same project...
    By jpcsolutions in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-18-2011, 01:52 AM

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