Hello,
I have a excel macro set up to launch Access using the Shell command and then I want to run a macro in Access. This works fine under office 2003, but does not work under 2007. I get and error "Object Required" on the DoCmd.RunMacro "mcrShipReq". Here is what I have:
Dim appTraffic
Application.DisplayAlerts = False
Application.ScreenUpdating = False
appTraffic = Shell("c:\Program Files\Microsoft Office\Office12\msaccess.exe D:\Data\ProdDataTraffic.accdb", 2)
AppActivate appTraffic 'Open Database ProdDataTraffic.accdb
DoCmd.RunMacro "mcrShipReq"
DoCmd.Quit acQuitSaveAll 'Quit Microsoft Access Application
' Return control to column E1 and refresh Data from MPD2
Range("E1").Select
ActiveWorkbook.RefreshAll
Thanks in advance for you help
I have a excel macro set up to launch Access using the Shell command and then I want to run a macro in Access. This works fine under office 2003, but does not work under 2007. I get and error "Object Required" on the DoCmd.RunMacro "mcrShipReq". Here is what I have:
Dim appTraffic
Application.DisplayAlerts = False
Application.ScreenUpdating = False
appTraffic = Shell("c:\Program Files\Microsoft Office\Office12\msaccess.exe D:\Data\ProdDataTraffic.accdb", 2)
AppActivate appTraffic 'Open Database ProdDataTraffic.accdb
DoCmd.RunMacro "mcrShipReq"
DoCmd.Quit acQuitSaveAll 'Quit Microsoft Access Application
' Return control to column E1 and refresh Data from MPD2
Range("E1").Select
ActiveWorkbook.RefreshAll
Thanks in advance for you help