Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Kick off access using excel.
Hi,
I am trying to start access using excel and run a macro. There are two problems. 1.) I get an error when I try to open access on the "Y:" drive. The Y drive is a shared drive at work that I have access to. My hard drive is drive "C:" Call Shell("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE Y:\Building.mdb") Error Message = ... 'The command line you used to start Microsoft Office Access contains an option that microsoft Office Acess doesn't recognize. 'Exit and restart Microsoft Office Access using valid command-line options. 2.) Do you know the syntax to use to start "Macro1" in the database? Thanks for your help!! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Kick off access using excel.
One other thing. I get the same error when I copy the database to the C:
drive so the code reads. Call Shell("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE C:\Building.mdb") Error message is the same . "Jeff" wrote: Hi, I am trying to start access using excel and run a macro. There are two problems. 1.) I get an error when I try to open access on the "Y:" drive. The Y drive is a shared drive at work that I have access to. My hard drive is drive "C:" Call Shell("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE Y:\Building.mdb") Error Message = ... 'The command line you used to start Microsoft Office Access contains an option that microsoft Office Acess doesn't recognize. 'Exit and restart Microsoft Office Access using valid command-line options. 2.) Do you know the syntax to use to start "Macro1" in the database? Thanks for your help!! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Kick off access using excel.
Sub tryThis()
Dim objAcc As Object On Error GoTo ender Set objAcc = CreateObject("Access.Application") objAcc.OpenCurrentDatabase _ "Y:\Building.mdb" objAcc.Visible = True With objAcc .DoCmd.RunMacro ("Macro1") End With closer: Set objAcc = Nothing Exit Sub ender: MsgBox Err.Description Resume closer End Sub Jeff wrote: One other thing. I get the same error when I copy the database to the C: drive so the code reads. Call Shell("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE C:\Building.mdb") Error message is the same . "Jeff" wrote: Hi, I am trying to start access using excel and run a macro. There are two problems. 1.) I get an error when I try to open access on the "Y:" drive. The Y drive is a shared drive at work that I have access to. My hard drive is drive "C:" Call Shell("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE Y:\Building.mdb") Error Message = ... 'The command line you used to start Microsoft Office Access contains an option that microsoft Office Acess doesn't recognize. 'Exit and restart Microsoft Office Access using valid command-line options. 2.) Do you know the syntax to use to start "Macro1" in the database? Thanks for your help!! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Kick off access using excel.
Wow! thanks for your help. What would I do without you guys.
"JW" wrote: Sub tryThis() Dim objAcc As Object On Error GoTo ender Set objAcc = CreateObject("Access.Application") objAcc.OpenCurrentDatabase _ "Y:\Building.mdb" objAcc.Visible = True With objAcc .DoCmd.RunMacro ("Macro1") End With closer: Set objAcc = Nothing Exit Sub ender: MsgBox Err.Description Resume closer End Sub Jeff wrote: One other thing. I get the same error when I copy the database to the C: drive so the code reads. Call Shell("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE C:\Building.mdb") Error message is the same . "Jeff" wrote: Hi, I am trying to start access using excel and run a macro. There are two problems. 1.) I get an error when I try to open access on the "Y:" drive. The Y drive is a shared drive at work that I have access to. My hard drive is drive "C:" Call Shell("C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE Y:\Building.mdb") Error Message = ... 'The command line you used to start Microsoft Office Access contains an option that microsoft Office Acess doesn't recognize. 'Exit and restart Microsoft Office Access using valid command-line options. 2.) Do you know the syntax to use to start "Macro1" in the database? Thanks for your help!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA Code to kick off macro when workbook command to close is initi | Excel Discussion (Misc queries) | |||
Excel vs. Access | Excel Discussion (Misc queries) | |||
Access to Excel | Excel Worksheet Functions | |||
Access Form In An Access Report (SubForm) Question | Links and Linking in Excel | |||
export access to excel. change access & update excel at same time | Excel Discussion (Misc queries) |