Problem calling a procedure in another project

B

Bill W

Can anyone offer assistance with the reason the following does not
work:

' Procedure in TestWorkbook.xls
Sub UpdateStatus()
thePage = "Status"
theCols = Array(12, 20, 35, 20, 20, 20, 20, 3)
[MyMacros.xls].[ModuleName].UpdateSiteFolder
End Sub

I get the object required error. BTW - this macro needs to be in
TestWorkbook.xls and UpdateSiteFolder will always be in MyMacros.xls

Thanks!
Bill
 
J

J Laroche

Bill W wrote on 2005/03/22 14:20:
Can anyone offer assistance with the reason the following does not
work:

' Procedure in TestWorkbook.xls
Sub UpdateStatus()
thePage = "Status"
theCols = Array(12, 20, 35, 20, 20, 20, 20, 3)
[MyMacros.xls].[ModuleName].UpdateSiteFolder
End Sub

I get the object required error. BTW - this macro needs to be in
TestWorkbook.xls and UpdateSiteFolder will always be in MyMacros.xls

Thanks!
Bill

Maybe you should look at the statement DECLARE in help. DECLARE tells VBA
where to find your external procedures.

JL
Mac OS X 10.3.8, Office v.X 10.1.6
 
B

Bob Greenblatt

Can anyone offer assistance with the reason the following does not
work:

' Procedure in TestWorkbook.xls
Sub UpdateStatus()
thePage = "Status"
theCols = Array(12, 20, 35, 20, 20, 20, 20, 3)
[MyMacros.xls].[ModuleName].UpdateSiteFolder
End Sub

I get the object required error. BTW - this macro needs to be in
TestWorkbook.xls and UpdateSiteFolder will always be in MyMacros.xls

Thanks!
Bill

Have you established a reference to mymacros.xls from testworkbook.xls?
 
B

Bill W

thank you, the referencing worked. the mymacros.xls file has 700KB of
modules & forms simply because I couldn't get procedures in separate
workbooks to work together. I can finally begin to break-them up.
 

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