Excel AddCommend

Excel AddCommend

Postby MarcoBoschi » Mon Feb 06, 2012 1:59 pm

Hi,
If I add a comment to a cell is it possible to determine the dimension
of the dialog containing toe commens istelf?
Directrly from code...
Bye


Code: Select all  Expand view
#include "fivewin.ch"
#define crlf CHR(13) + CHR(10)

FUNCTION MAIN()
   LOCAL oExcel, oAs

   oExcel := CREATEOBJECT( "Excel.Application" )
   oExcel:Workbooks:Add()
   oAs := oExcel:Activesheet()

   oAs:Range( "A1" ):Value := "Simple comment"
   oAs:Range( "A1" ):AddComment( "FiveTech Software tech support forums" )
   oAs:Range( "A1" ):Comment:visible := .F.


   oExcel:visible := .T.

RETURN NIL
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Excel AddCommend [Solved]

Postby MarcoBoschi » Tue Feb 07, 2012 7:55 am

This is the solution:

oAs:Range( "A1" ):Comment:Shape:Textframe:Autosize := .T.

:idea:
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: Excel AddCommend

Postby Gale FORd » Tue Feb 07, 2012 2:45 pm

Don't forget, you can record macro in excel and do what you want. Then go back and see what the commands are to perform action.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Excel AddCommend

Postby MarcoBoschi » Tue Feb 07, 2012 2:49 pm

ok!
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests