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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Relative References in a Range from OLE2

Status
Not open for further replies.

krindler

Programmer
Joined
Jul 16, 2002
Messages
39
Location
US
Hello...

Does anyone have any example code of using relative references in a range? Is it possible? The code I have been using various forms of is listed below, but it doesn't seem to work?

args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG ( args, 'RC:RC[23]' );
range := OLE2.GET_OBJ_PROPERTY ( worksheet, 'Range', args);
OLE2.DESTROY_ARGLIST ( args );

args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG ( args, xlEdgeTop );
border := OLE2.GET_OBJ_PROPERTY ( range, 'Borders', args);
OLE2.DESTROY_ARGLIST ( args );
OLE2.SET_PROPERTY ( border, 'LineStyle', xlContinuous );
OLE2.SET_PROPERTY ( border, 'Weight', xlHairline );
OLE2.RELEASE_OBJ ( border );
OLE2.RELEASE_OBJ ( range );

Any help you could give me would be much appreciated.

Thanks in Advance...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top