LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Referring to Excel objects in VSTO

Hi,

I'm using Visual Studio 2008 Professional Edition and Microsoft Office 2003
and working with an Excel 2003 Workbook template. The language I'm using is
Visual Basic.

When I'm in one of Excel's objects (like a worksheet), I can refer to
objects like in Me.Application.Workbooks(1). However, when I insert a new
module, I can't use the same syntax, because Visual Basic does not recognize
it. For what I know, I must use CType instead, but I don't know how to use
it.

Can anyone help me? It would be of great help if someone could give me an
example of how refer to a workbook, like in:

Dim wbk As Excel.Workbook
wbk = CType(x,Excel.Workbook)

Thanks in advance,

--
Carlos Mallen
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel VBA Class Objects - Parent & Successor Objects [email protected] Excel Programming 1 January 15th 07 12:06 AM
VSTO 2.0 vs Excel VBA Ben Excel Programming 1 November 3rd 05 02:17 PM
Excel in VSTO Milo Excel Programming 0 June 17th 05 02:57 AM
Referring Objects Squid[_3_] Excel Programming 1 November 12th 04 03:27 AM
Unable to remove Sheet objects in the Microsoft Excel Objects Adrian[_7_] Excel Programming 1 August 26th 04 10:49 PM


All times are GMT +1. The time now is 07:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"