Scartabellando trovato Macro Excel eseguita da macro Acces:
- Codice: Seleziona tutto
Sub RunExcelMacro()
Dim xl As Object
'Esegue macro Excel su file Excel
'Step 1: Start Excel, then open the target workbook.
Set xl = CreateObject("Excel.Application")
xl.Workbooks.Open ("C:\Prova_lancio_macro_da_VB6.xlsm")
'Step 2: Make Excel visible
xl.Visible = True
'Step 3: Run the target macro
xl.Run "Prova_lancio_macro_da_Access"
'Step 4: Close and save the workbook, then close Excel
xl.ActiveWorkbook.Close (True)
xl.Quit
'Step 5: Memory Clean up.
Set xl = Nothing
End Sub