How to open an Excel workbook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am able to open Excel through a button on an Access form, but I can't seam
to get Excel to open a specific workbook.

Any ideas?
 
Assuming you've correctly instantiated Excel, you need to use its Open
method.

For instance, here's code I use:

If fIsAppRunning("Excel") Then
Set xlCurr = GetObject(, "Excel.Application")
booXL = False
Else
Set xlCurr = CreateObject("Excel.Application")
booXL = True
End If

Set wkbCurr = xlCurr.Workbooks.Open(strFile)

(fIsAppRunning is from http://www.mvps.org/access/api/api0007.htm at "The
Access Web")
 
Back
Top