File A and File B Together

G

Guest

I have an excel file, File B (with macros), that is run during a month to
collect data. I have another excel file, File A (with macros), that runs at
month end. File A opens File B and works with the data in File B.

I need a way for the macros in File B to know whether it is running on its
own or whether it has been opened by File A. The 'Public' statement Help
says "variables declared using the Public statement are available to all
procedures in all modules in all applications", but File B doesn't seem to
pick up on a Public variable I have in File A.

I have also tried having File B check to see if File A is open, but that
always seems to come back true, even when File B is opened on its own.

Any ideas would be appreciated.
 

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