![]() |
cannot access macro in another file
Hi All,
In my addin, I open an excel file, then call a macro in that file. I close the file, and then open another and do the same. I repeat this 8 times with different files. Everything worked fine. I modified all of the marcos exactly the same. (added the same code) Now, one of the files fails. I get an error saying: Run-time error '1004': The macro SLOPE_MONITORING_1XX_BellPit.xls'!THisWorkbook.mai n()' cannot be found. My other 8 files are called _2XX_ to _9XX_ They all work fine, it is just this one. I went though everything line by line, there is no differences between any of the files. Please help, Chad |
cannot access macro in another file
Also, if I change the line in the addin to .Main1()
and the sub in the other file to Main1(), it still fails "Chad" wrote in message ... Hi All, In my addin, I open an excel file, then call a macro in that file. I close the file, and then open another and do the same. I repeat this 8 times with different files. Everything worked fine. I modified all of the marcos exactly the same. (added the same code) Now, one of the files fails. I get an error saying: Run-time error '1004': The macro SLOPE_MONITORING_1XX_BellPit.xls'!THisWorkbook.mai n()' cannot be found. My other 8 files are called _2XX_ to _9XX_ They all work fine, it is just this one. I went though everything line by line, there is no differences between any of the files. Please help, Chad |
cannot access macro in another file
Nor can I call any marco from that file
"Chad" wrote in message ... Hi All, In my addin, I open an excel file, then call a macro in that file. I close the file, and then open another and do the same. I repeat this 8 times with different files. Everything worked fine. I modified all of the marcos exactly the same. (added the same code) Now, one of the files fails. I get an error saying: Run-time error '1004': The macro SLOPE_MONITORING_1XX_BellPit.xls'!THisWorkbook.mai n()' cannot be found. My other 8 files are called _2XX_ to _9XX_ They all work fine, it is just this one. I went though everything line by line, there is no differences between any of the files. Please help, Chad |
cannot access macro in another file
Got it,
I had brackets after the funciton name. I hate the little things Thanks anyways, Chad "Chad" wrote in message ... Hi All, In my addin, I open an excel file, then call a macro in that file. I close the file, and then open another and do the same. I repeat this 8 times with different files. Everything worked fine. I modified all of the marcos exactly the same. (added the same code) Now, one of the files fails. I get an error saying: Run-time error '1004': The macro SLOPE_MONITORING_1XX_BellPit.xls'!THisWorkbook.mai n()' cannot be found. My other 8 files are called _2XX_ to _9XX_ They all work fine, it is just this one. I went though everything line by line, there is no differences between any of the files. Please help, Chad |
All times are GMT +1. The time now is 07:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com