FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Excel AddCommend
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Excel AddCommend
Posted: Mon Feb 06, 2012 01: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 (fw): Select all Collapse
#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
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Excel AddCommend [Solved]
Posted: Tue Feb 07, 2012 07:55 AM

This is the solution:

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

:idea:

Marco Boschi
info@marcoboschi.it
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Excel AddCommend
Posted: Tue Feb 07, 2012 02: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.

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Excel AddCommend
Posted: Tue Feb 07, 2012 02:49 PM

ok!

Marco Boschi
info@marcoboschi.it

Continue the discussion