cannot access macro in another file

C

Chad

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.main()' 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
 
C

Chad

Also, if I change the line in the addin to .Main1()
and the sub in the other file to Main1(), it still fails
 
C

Chad

Got it,

I had brackets after the funciton name.
I hate the little things

Thanks anyways,
Chad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top