Sorry about the subject, but I have no idea what to call this.
I am, however, really drawing a blank on this one.
I have a tool that has been created and runs fine in Excel 2007, but when I test it in 2013 I get a Excel Run-time error and am unable to debug because Excel crashes when told to do so.
Searching the net for possible causes there are numerous posts where folks are reporting the same issue and they all seem to stem from the use the following copy code from version 2007 to 2013. Also they are working with multiple workbooks.
Funny thing is there is no single reason for this to occur. The problem seems to manifests itself after the second running of the code. I have no idea why. There are a whole slew of potential fixes that resolve this problem for various people around the net, and after searching high and low I believe I finally hit upon the reason for my issue and it is due to the Application.CutCopyMode somehow getting stuck in Excel version 2013?
Reason I believe this is the cause is because after the first time the code runs, if I go to the workbook where the copy will occur should I run the code again and manually select the items that the code would copy and then try to do a ctrl-C of that selection the tool will crash the same exact way as running the code.
However, if I then restart the tool and run the code again and then before doing the manual copy step I did above I click the worksheet and select various cells and push the keyboard esc button, THEN select and ctrl copy. I am fine and I know the next go round of the code will work correctly.
I have tried programming this random selection of items to try and mimic my movements so that the CutCopyMode is totally squashed. I even set the mode = false but something is not the same and the code when run stand alone crashes again.
I know I have read various solutions on this site and what seems like a hundred more in other websites, but nothing seems to be getting me over this hump.
After reading all the random issues on the net I would think this is a MS issue, but nothing seems to be addressed or hot fixed.
Any and all help is much obliged.
Thanks,
FM3
I am, however, really drawing a blank on this one.
I have a tool that has been created and runs fine in Excel 2007, but when I test it in 2013 I get a Excel Run-time error and am unable to debug because Excel crashes when told to do so.
Searching the net for possible causes there are numerous posts where folks are reporting the same issue and they all seem to stem from the use the following copy code from version 2007 to 2013. Also they are working with multiple workbooks.
Code:
Sheets(OutName).Range("A2:R39").Select
ThisWorkbook.Sheets(OutName).Range("A2:R39").Copy
ThisWorkbook.Sheets(OutName).Range("a" & RowCopy).Select
ThisWorkbook.Sheets(OutName).Paste
Funny thing is there is no single reason for this to occur. The problem seems to manifests itself after the second running of the code. I have no idea why. There are a whole slew of potential fixes that resolve this problem for various people around the net, and after searching high and low I believe I finally hit upon the reason for my issue and it is due to the Application.CutCopyMode somehow getting stuck in Excel version 2013?
Reason I believe this is the cause is because after the first time the code runs, if I go to the workbook where the copy will occur should I run the code again and manually select the items that the code would copy and then try to do a ctrl-C of that selection the tool will crash the same exact way as running the code.
However, if I then restart the tool and run the code again and then before doing the manual copy step I did above I click the worksheet and select various cells and push the keyboard esc button, THEN select and ctrl copy. I am fine and I know the next go round of the code will work correctly.
I have tried programming this random selection of items to try and mimic my movements so that the CutCopyMode is totally squashed. I even set the mode = false but something is not the same and the code when run stand alone crashes again.
I know I have read various solutions on this site and what seems like a hundred more in other websites, but nothing seems to be getting me over this hump.
After reading all the random issues on the net I would think this is a MS issue, but nothing seems to be addressed or hot fixed.
Any and all help is much obliged.
Thanks,
FM3