none
Excel 2010 not playing well with excel 2013 VBA issues RRS feed

  • Question

  • I have a spreadsheet application developed in excel 2007 and then used in 2010 and now I have two PC 1 with 2010 and the other with 2013.  I am having a problem where the VBA code stops working once the file is saved on the 2013 system.  It is simple command where the code is hanging up.  Like "Sheets("sheet1").select"  this return a subscript out of range error.   I get the same thing when trying to return to an already open workbook.  Seems a recent problem.  Can you point me towards a fix?  I use these sheets daily at work and they have been working flawlessly for years.

    Jim Brizendine


    Bowie

    Wednesday, April 22, 2015 2:18 PM

Answers

  • Hi Jim Bob,

    >>subscript out of range error<<

    From this error message, this issue is relative to the index of worksheets collection. Please ensure that the reference worksheets exits in the workbook.

    In addtion, to make this code work please make sure the worksheets's workbook is activeate. Also I suggest that you always reference the worksheets via specific workbook to make sure which workbook we are developing with.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 27, 2015 5:57 AM
    Moderator

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for Excel

    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    George Zhao
    TechNet Community Support


    It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs.

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.
    Thursday, April 23, 2015 3:06 AM
  • JB

    What word for me was simply putting the workbook name in from of the code above so

    Workbooks("Myworkbook").Sheets("sheet1").select

    Worked for me- no idea why 2013 has all these issues- it's now making protecting sheets in VB so slow that users turn away from it- progress??

    can't remember if you need to put in .xlsm after WB name!

    let me know if solves the issue

    D

    Thursday, April 23, 2015 10:49 AM
  • Hi Jim Bob,

    >>subscript out of range error<<

    From this error message, this issue is relative to the index of worksheets collection. Please ensure that the reference worksheets exits in the workbook.

    In addtion, to make this code work please make sure the worksheets's workbook is activeate. Also I suggest that you always reference the worksheets via specific workbook to make sure which workbook we are developing with.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 27, 2015 5:57 AM
    Moderator