E
Ed White
I'm using VSTO with VB in VS 2008 and Excel 2007, and trying to understand
something basic. I've written some public methods in ThisWorkbook.vb, which
is the class created by VSTO with "Public Class ThisWorkbook". Suppose one
method I've writtine in the workbook is Public TestMethod. If I am writing
code in a worksheet, e.g. Sheet1.vb, and I want to access TestMethod, how do
I do it? TestMethod is under the ThisWorkbook class, and is not a shared
method. If I write ThisWorkbook.TestMethod, it says it's a non-shared member
and requires an object reference. Do I create an new instance of
ThisWorkbook in Sheet1, or will this confuse VSTO/Excel?
something basic. I've written some public methods in ThisWorkbook.vb, which
is the class created by VSTO with "Public Class ThisWorkbook". Suppose one
method I've writtine in the workbook is Public TestMethod. If I am writing
code in a worksheet, e.g. Sheet1.vb, and I want to access TestMethod, how do
I do it? TestMethod is under the ThisWorkbook class, and is not a shared
method. If I write ThisWorkbook.TestMethod, it says it's a non-shared member
and requires an object reference. Do I create an new instance of
ThisWorkbook in Sheet1, or will this confuse VSTO/Excel?