Hello!
I have an excel sheet under d: \temp\test.xls with a macro named "makro1". This is a makro available in "all sheets". Now i have an Access form where I have a button with action I want to run MAKRO1 in excel sheet. I have used following scripttaken and modified from Mr. Excel--thanks)
Private Sub Befehl13_Click()
Dim xls As Object
Dim wrk As Object
Set xls = CreateObject("Excel.Application")
Set wrk = xls.Workbooks.Open("D:\temp\test.xls")
Rem xls.Run ("Makro1.Module3")(i have tried("Module3.Makro1"(
wrk.Close False
xls.Quit
Set xls = Nothing
End Sub
But from Access when I clicl the button, I have message: makro1 not found.
Also is it possible that after running the macro, the excel sheet may remain open??
thanks
I have an excel sheet under d: \temp\test.xls with a macro named "makro1". This is a makro available in "all sheets". Now i have an Access form where I have a button with action I want to run MAKRO1 in excel sheet. I have used following scripttaken and modified from Mr. Excel--thanks)
Private Sub Befehl13_Click()
Dim xls As Object
Dim wrk As Object
Set xls = CreateObject("Excel.Application")
Set wrk = xls.Workbooks.Open("D:\temp\test.xls")
Rem xls.Run ("Makro1.Module3")(i have tried("Module3.Makro1"(
wrk.Close False
xls.Quit
Set xls = Nothing
End Sub
But from Access when I clicl the button, I have message: makro1 not found.
Also is it possible that after running the macro, the excel sheet may remain open??
thanks