I am trying to open a specific excel file with the following code:
When running it I receive this error:
Sub or function not defined
highlighting the OPENEXCELFILE ("C:......
How can I solve the problem?
Thanks to all.
Declan
Code:
Private Sub cmdExcel_Click()
OpenExcelFile ("C:\Documents and Settings\Planner.xls")
Dim objXL As Object
On Error Resume Next
Set objXL = GetObject(, "Excel.Application")
Set objXL = GetObject(strPathToFile)
objXL.Application.Visible = True
objXL.Parent.Windows(1).Visible = True
End Sub
Sub or function not defined
highlighting the OPENEXCELFILE ("C:......
How can I solve the problem?
Thanks to all.
Declan