Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active cell

Status
Not open for further replies.

busman66

MIS
May 10, 2002
5
GB
I have a problem that I can't seem to work out. How do I make a particular cell on my excel worksheet, the active cell (D5). I’ve accessed my active worksheet like this

V= Variant::GetActiveObject("excel.application");
V.OlePropertySet("Visible",true);

But I don’t know how to set D5 to be the active cell. I've read the help file but that didn't help. Please could somebody.

Mark.
 
thanks alot, I didn't know how to do this in cbuilder.
I always used vb or vba to do office automation.

after a little experiment I came up with this:

V = Variant::GetActiveObject( "excel.application" );
V.OlePropertySet( "Visible", true );
V2 = V.OlePropertyGet( "Cells" );
V3 = V2.OlePropertyGet( "Range", "D5" );
V3.OleFunction( "Select" );



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top