[RESOLVED] Fix Excel late binding errors
This code is straight from Microsoft's pages
Code:
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
'Start a new workbook in Excel.
oExcel = CreateObject("Excel.Application")
oBook = oExcel.Workbooks.Add
With Option Strict On you get "option strict disallows late binding" on the last line.
How do you fix that?
Re: Fix Excel late binding errors
the way your code is, i'd just turn Option Strict off.
with Option Strict on, oExcel As Object doesn't have a .Workbooks.Add method
Re: Fix Excel late binding errors
Shaggy Hiker has a vb.net/excel example in the vb.net codebank that demonstrates late binding
Re: Fix Excel late binding errors
Ahh thanks paul, thats what I was thinking too. I will also look at the codebank.