I am attempting to open an excel worksheet and update the links using VB6. For some reason the Excel.Application is not being created and I receive the following error:
<Object variable or With block variable not set>
Below is my code:
Private Sub UpdateLinks()
Dim ExAp As Excel.Application
Dim ExWb As Excel.Workbook
Set ExAp = New Excel.Application
ExWb.Open "C:\Projects\filename.xls", 3, True
ExWb.RunAutoMacros xlAutoActivate
End Sub
<Object variable or With block variable not set>
Below is my code:
Private Sub UpdateLinks()
Dim ExAp As Excel.Application
Dim ExWb As Excel.Workbook
Set ExAp = New Excel.Application
ExWb.Open "C:\Projects\filename.xls", 3, True
ExWb.RunAutoMacros xlAutoActivate
End Sub