Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to create XL file then run XL VBA (to format & filter XL file) from Access VBA? [email protected] Excel Discussion (Misc queries) 1 June 6th 08 06:37 AM
Help! Security when using a VBA macro to access an Excel File biker Excel Programming 0 June 16th 06 05:27 AM
how do i password protect an .xls file? how do i unlock it for automation. e.g. want to unlock and access a .xls from another .xls macro. Daniel Excel Worksheet Functions 1 June 24th 05 02:59 PM
How do I open an Access file with a macro in Excel? gaitkeeper Excel Programming 1 May 26th 05 10:06 PM
VB Code or Excel macro to run Query/Import on Access file Harry[_8_] Excel Programming 13 February 22nd 05 07:27 PM


All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"