Hi, I struggling to locate how to toggle between Access and Excel within VBA code running on the Access side.
I am reading a flat (text) file to update both Access tables and Excel workbook within the same process.
No problem updating the Access table but for Excel purposes, I have created an Access VBA User Defined Function with 3 call types: OPEN, UPDATE and CLOSE that is intended to open a workbook on the first call, update the workbook on subsequent calls (having retrieved a record fron the flat file) and close the workbook on the final call
I have succeeded with the OPEN call, but not the Update because I suspect I have to tell VBA I'm now doing Excel type processing when I make an UPDATE call. I surely don't have to constantly open and close the workbook to make updates?
I can see how I can do this using a recordset (having first processed the flat file in its entirety) but would like to understand the basic principles of switching between the two APPS in VBA?
I am running Office 2003 on Windows 7
Many thanks in advance
Phil Davis
I am reading a flat (text) file to update both Access tables and Excel workbook within the same process.
No problem updating the Access table but for Excel purposes, I have created an Access VBA User Defined Function with 3 call types: OPEN, UPDATE and CLOSE that is intended to open a workbook on the first call, update the workbook on subsequent calls (having retrieved a record fron the flat file) and close the workbook on the final call
I have succeeded with the OPEN call, but not the Update because I suspect I have to tell VBA I'm now doing Excel type processing when I make an UPDATE call. I surely don't have to constantly open and close the workbook to make updates?
I can see how I can do this using a recordset (having first processed the flat file in its entirety) but would like to understand the basic principles of switching between the two APPS in VBA?
I am running Office 2003 on Windows 7
Many thanks in advance
Phil Davis
Comment