Excel AddCommend

Post Reply
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Excel AddCommend

Post by MarcoBoschi »

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

#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
Marco Boschi
info@marcoboschi.it
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: Excel AddCommend [Solved]

Post by MarcoBoschi »

This is the solution:

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

:idea:
Marco Boschi
info@marcoboschi.it
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: Excel AddCommend

Post by Gale FORd »

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.
User avatar
MarcoBoschi
Posts: 1071
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: Excel AddCommend

Post by MarcoBoschi »

ok!
Marco Boschi
info@marcoboschi.it
Post Reply