Excel 2000 - How Do you call a sub routine in a different worksheets?

a_moore
a_moore used Ask the Experts™
on
This one has me stumped, how can one call a sub routine that is sitting in a different worksheet in the same workbook? e.g I am currently running a macro in my "main" worksheet and I want to call a sub routine that is sitting in my "sub" worksheet.

Tried the following but it did not work:

Call Sheets("CCS_Export").ExportTabFile

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Billing Engineer
Most Valuable Expert 2014
Top Expert 2009
Commented:
I tried, and it worked for me. Is the ExportTabFile sub declared as public?
CHeers
Top Expert 2006

Commented:
Hello Moore,

you could try

sheet1.ExportTabFile

where sheet1 is the object name in the vb editor not the sheet tab name

HAGD:O)Bruintje

Author

Commented:
Opps :) Knew I had left something out. Suppose that what happens when you have not programmed for quite some time. tx
Top Expert 2006

Commented:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial