DIVINEDAR0956
IS-IT--Management
I have the following procedure to open an excel sheet from Access. I am getting a Type Error Message when the sheet opens. I can't figure out why please help.
Private Sub Excel_New_File()
Dim xlApp As Object
Dim xlWB As WORKBOOK
Set xlApp = CreateObject("Excel.Application"
xlApp.AskToUpdateLinks = False
xlApp.DisplayAlerts = False
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Open("C:\WBS_Excel50.xls", False)
xlWB.Sheets("Sheet1"
.Select
xlApp.AskToUpdateLinks = True
xlApp.DisplayAlerts = True
Set xlApp = Nothing
End Sub
I am getting the message on this line:
Set xlWB = xlApp.Workbooks.Open("C:\WBS_Excel50.xls", False)
Thank you![[hammer] [hammer] [hammer]](/data/assets/smilies/hammer.gif)
Private Sub Excel_New_File()
Dim xlApp As Object
Dim xlWB As WORKBOOK
Set xlApp = CreateObject("Excel.Application"
xlApp.AskToUpdateLinks = False
xlApp.DisplayAlerts = False
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Open("C:\WBS_Excel50.xls", False)
xlWB.Sheets("Sheet1"
xlApp.AskToUpdateLinks = True
xlApp.DisplayAlerts = True
Set xlApp = Nothing
End Sub
I am getting the message on this line:
Set xlWB = xlApp.Workbooks.Open("C:\WBS_Excel50.xls", False)
Thank you
![[hammer] [hammer] [hammer]](/data/assets/smilies/hammer.gif)