Hello,
I am new to vb and am having a problem with my macro. The problem is that I am getting different errors on varying lines after I run my macro some random number of times. I have tried multiple solutions and can see no real correlation between the symptoms and changing anything in my code. If I save and close my file and then try to rerun the macro it works just fine the first time but after that it may or may not error again. Additionally, after receiving an error and resetting and then waiting a few minutes, the macro will sometimes rerun with no problems. The problem is hard to diagnose because of its dynamic nature and therefore it is difficult to describe. I will attach my file that contains all pertinent code and example data and maybe someone running Excel 2010 on windows 7 can replicate my problem on their machine. A little more info about my file: I created a custom tab "Caesar" with custom buttons to run my macros using an custom UI editor. These buttons (primarily "Run All") execute the macros I am having trouble with. I realize that I may have written certain parts of the code in sub optimal fashion but I am open to any suggestions and any help I can get. As far as the functionality of the code goes, it does exactly what I want to to do every time until it hits an error and even then it performs properly and just does not finish. I apologize if I have left any necessary data out but like I said I am new to vb and the problem is difficult to describe.
Thanks in advance for any help
View attachment mytest - for upload.xlsm
I am new to vb and am having a problem with my macro. The problem is that I am getting different errors on varying lines after I run my macro some random number of times. I have tried multiple solutions and can see no real correlation between the symptoms and changing anything in my code. If I save and close my file and then try to rerun the macro it works just fine the first time but after that it may or may not error again. Additionally, after receiving an error and resetting and then waiting a few minutes, the macro will sometimes rerun with no problems. The problem is hard to diagnose because of its dynamic nature and therefore it is difficult to describe. I will attach my file that contains all pertinent code and example data and maybe someone running Excel 2010 on windows 7 can replicate my problem on their machine. A little more info about my file: I created a custom tab "Caesar" with custom buttons to run my macros using an custom UI editor. These buttons (primarily "Run All") execute the macros I am having trouble with. I realize that I may have written certain parts of the code in sub optimal fashion but I am open to any suggestions and any help I can get. As far as the functionality of the code goes, it does exactly what I want to to do every time until it hits an error and even then it performs properly and just does not finish. I apologize if I have left any necessary data out but like I said I am new to vb and the problem is difficult to describe.
Thanks in advance for any help
View attachment mytest - for upload.xlsm