In my Basic.Net code, I figured out that I can resolve the Application
references with the statements:
Dim ExcelWorkbook = Excel.Workbook
Dim ExcelWorksheet = Excel.ApplicationClass
That made the syntax errors go away. BUT if I try to do something
really simple like MsgBox(Application.Cells("A1")
I get an #Value! error in Excel.
Which when I think about it, I'm not assigning ExcelWorkbook nor
ExcelWorksheet to anything, so it's no wonder why I get an error.
So.......
How do I reference to actual Excel Object? (So that I can refer to cells,
ranges, and use Excel's functions.)
(My code didn't start Excel; Excel called me).
I don't have the Visual Studio Tools for Office (maybe I should buy it???)
On Wed, 15 Mar 2006 12:32:39 +0100, Carlos J. Quintero [VB MVP] wrote:
ThisWorkBook can be used inside VBA because it is an intrinsic object, but
from outside you need to retrieve the WorkBook from the Application
instance, usingh objApplication.ActiveWorkbook or
objApplication.WorkBooks.Item(xxx)
Which is your specific problem?