Results 1 to 1 of 1
2002-01-04, 02:30 #1
- Join Date
- Jul 2001
- Thanked 0 Times in 0 Posts
Auto start macro (Access 97/Excel 97)
I have posted this question in excel as well: follow the link please
<A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=xl&Number=104770&page=0&vie w=collapsed&sb=5&o=0&fpart=&vc=>http://www.wopr.com/cgi-bin/w3t/showflat.p...;fpart=&vc=</A>
Hi all i have an event procedure code in an acess form that exports a query to an excel file, i then have the code that opens the excel file that was just ouputed to for the viewer. I have a macro in that excel workbook that i would like executed everytime it is opened(ie after the export)
the code in access is:
Private Sub cmdExp_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Find All Issues by Selected Criteria2", "C:WINNTProfilesEdward SantevecchiDesktopFind All Issues By Selected Criteria2.xls"
Dim appExcel As Excel.Application
Set appExcel = CreateObject("Excel.Application")
appExcel.Visible = True
appExcel.Workbooks.Open "C:WINNTProfilesEdward SantevecchiDesktopFind All Issues By Selected Criteria2.xls"
/////Code that runs excel macro here would be great!!!!!!!!!!////////////////////////////////
If i could auto start the macro from within excel that would work or if there were code i could use in access to execute an excel macro that would do the same, i think the coding would be more difficult though. ANy suggesstions?
Edited by Charlotte to activate link