View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Open Excel from access

Try this in Access

Sub test()
On Error Resume Next
Set xl = GetObject(, "Excel.Application")
If xl Is Nothing Then
Set xl = GetObject("", "Excel.Application")
xl.workbooks.Open "C:\Data\book1.xls"
xl.UserControl = True
xl.Visible = True
End If
AppActivate "Microsoft Excel"
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"John" wrote in message ...
I have not been able to figure out how to open a specific
excel workbook from access and have it be the active
screen. If anyone has any ideas I would greatly
appreciate it.

Thanks,
John