Hello,
I have an access program connected to a large database. The access program calls an excel file and performs some calculations and saves the results in the access database.
I am trying to automate this process and was wondering how I can call from within the access vba, a vba-routine that is connected to the excel file.
The following vba code inside Access opens the excel file
I would like to call the excel subroutine "MyRoutine" from inside the same block of Access code. Is this possible?Set Excel = CreateObject("Excel.Application") With Excel .Visible = True .UserControl = True .Workbooks.Open ("C:\MyFile.xls") End with
Thank you,
Lanox
Last edited by Lanox; 08-31-2011 at 09:12 AM.
Found the solution myself:
Excel.Run "MyRoutine"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks