Full Version: Acces to Excel Data transfer with multiple subroutines
UtterAccess Discussion Forums > Microsoft® Access > Access Automation
Quadrant
I am trying to transfer data created in Access to an excel file. The problem i am having is that to keep the code understandable i want to break it up into different subroutines and modules. Is there a way i can transfer the object connectivity with excel without constantly opening and closing the workbook each time i switch subroutines. I know one way would be to make it a global variable but i would like to avoid doing that if at all possible.

Thank you,

Mike
Quadrant
Does anyone know if doing the following would work.

When leaving excel open from one sub to the other. using a getobject to assign excel to a variable again setting the active sheet to an object variable. The only problem i see is that i don't think there is an active workbook command.

basically if i didn't explain myself well enough before i want to do the following.

Leave excel open over here

Run a few different sub routines over here that keep re-associating object variables with the open excel workbook and sheets. This would allow me to access the same file without opening and closing it constantly.

Thank you,

Mike
Quadrant
Is there anyone out there that can help me?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.