Hi
Please can someone assist opening excel from access - but I do not want to specify the path,, so am looking for the open dialog box.
Also I have heard you need to close the instance of excel once the user has closed excel,
Please can someone let me know how it is done.
I have got the following code - but need the path to be a dialog box.
Thank you
Private Sub OpenExcel_Click()
Dim xlApp As Object
On Error Resume Next
Set xlAppp = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
'Excel wasn't running, start it from code
Set xlApp = CreateObject("Excel.Application")
End If
On Error GoTo 0
xlAppp.Workbooks.Open ("C:\MS Access Databases\Export.xlsx")
objXL.Application.Visible = True
objXL.Parent.Windows(1).Visible = True
End Sub
Please can someone assist opening excel from access - but I do not want to specify the path,, so am looking for the open dialog box.
Also I have heard you need to close the instance of excel once the user has closed excel,
Please can someone let me know how it is done.
I have got the following code - but need the path to be a dialog box.
Thank you
Private Sub OpenExcel_Click()
Dim xlApp As Object
On Error Resume Next
Set xlAppp = GetObject(, "Excel.Application")
If Err.Number <> 0 Then
'Excel wasn't running, start it from code
Set xlApp = CreateObject("Excel.Application")
End If
On Error GoTo 0
xlAppp.Workbooks.Open ("C:\MS Access Databases\Export.xlsx")
objXL.Application.Visible = True
objXL.Parent.Windows(1).Visible = True
End Sub