ActiveSheet name

Add-in Express™ Support Service
That's what is more important than anything else

ActiveSheet name
Finding Excels activesheet name 
Nick Glasier




Posts: 6
Joined: 2004-12-07
I'm using AddinExpress V2 VCL with Delphi V7 Professional, and am trying to obtain the name of the active worksheet in Excel. No such property for activesheet shows in Delphi's code completion window, and the compiler doesn't recognise it although it is a valid property for the activesheet according to Excels Visual Basic help file. Am I missing something?

Also can anyone tell me how to get the active cell address as well?

TIA Nick
Posted 07 Dec, 2004 15:39:31 Top
Guest


Guest


Hi Nick,

Delphi doesn't show the ActiveSheet property because it returns an IDispatch. Look at Excel2000.pas.

You can get access to this property via the following trick:

s := OLEVariant(YourAddinModule.ExcelApp.ActiveSheet).Name;

As for the active cell, look at our ADX Toys:
http://www.add-in-express.com/free-addins/delphi-excel-addin.php
Posted 07 Dec, 2004 15:56:00 Top
Nick Glasier




Posts: 6
Joined: 2004-12-07
Reply to guest,

Many thanks for the quick reply :D

Nick
Posted 08 Dec, 2004 00:26:58 Top