Consultor Eletrônico



Kbase 18781: ACTIVEX - How To Turn GridLines Off In Excel
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Status: Verified

GOAL:

How to turn off the gridlines for a given item inside of a workbook in Microsoft Excel.

FACT(s) (Environment):

Windows 32 Intel
Windows NT 32 Intel/Windows 2000

FIX:


DEFINE VARIABLE oExcel AS COM-HANDLE NO-UNDO.

CREATE "Excel.Application" oExcel.

/* Make Excel Appear on the Screen */

oExcel:Visible = True.

/* Add a WorkBook (otherwise we just get Excel w
o workbook) */

oExcel:WorkBooks:Add().

/* Now we grab the first WorkBook then within that object we grab */
/* the first window object and finally we turn off the gridlines  */
/* for that object.                                               */

oExcel:WorkBooks:Item(1):Windows:Item(1):DisplayGridLines = False.

/* Pause to allow you to see that the gridlines are gone */

PAUSE.

/* Tell Excel that we really want it to go away */

oExcel:Quit().

/* Release the object reference */

RELEASE OBJECT oExcel.