Start Excel inside MSaccess with a makro
Hi
here is another problem i have been grounded with... This code example is what my poor knowledge in VBA have let me done so far... The option_click is done with a clickbutton in MsAccess /thanks Lars -------------------- "" -------------------""----------------------- Option Compare Database '------------------------------------------------------------ ' With a Click button ' Start Excel inside MsAccess and start autom. a Makro when Excel executes ' I have used the Makro funktion inside Msaccess to start Excel ' and it starts with ' Function and after that a Shell is open ' I dont get the Code working that will start my Excel makro autom ' The code module would be something like this I guess '-------------------- Private Sub Kommandoknapp6_Click() '------------------------------------------------------------ ' Makro1 ' '------------------------------------------------------------ Function Makro1() On Error GoTo Makro1_Err Call Shell("Excel.exe c:\dbcq\bok1.xls", 1) '------------------------------------------------------------ ' Here comes the tricky part to invoke the makro '------------------------------------------------------------ Call Shell("Makro1") Makro1_Exit: Exit Function Makro1_Err: MsgBox Error$ Resume Makro1_Exit End Function End Sub |
All times are GMT +1. The time now is 08:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com