Excel Help

Excel Help

Postby Jeff Barnes » Wed Jul 25, 2012 10:38 pm

Does anyone know how I would write FWH code for the following excel code???

Code: Select all  Expand view

    Range("K27").Select
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .ThemeColor = xlThemeColorDark1
        .TintAndShade = -0.149998474074526
        .PatternTintAndShade = 0
    End With
 
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Excel Help

Postby hua » Thu Jul 26, 2012 2:09 am

A snippet of what I'm using

Code: Select all  Expand view

#define xlSolid 1
#define xlAutomatic -4105
#define xlThemeColorDark1  1 // Only Office 2007 and above
  .
  .
  oSelection := ::oSheet:Range( "A6:H6" )
  oSelection:Font:FontStyle := "Bold"

  with object oSelection:Interior
       :Pattern = xlSolid
       :PatternColorIndex = xlAutomatic
       :ThemeColor = xlThemeColorLight2
       :TintAndShade = 0.399975585192419
       :PatternTintAndShade = 0
  end
 
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Excel Help

Postby Jeff Barnes » Thu Aug 02, 2012 5:54 pm

Thanks Hua,

I got it working with the help from your code :)
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Excel Help

Postby hua » Fri Aug 03, 2012 1:30 am

You're welcome :)

Listing the rest of #define that I'm using in case it might be of use to others
Code: Select all  Expand view

#define xlHAlignLeft   -4131
#define xlHAlignRight  -4152
#define xlHAlignCenter -4108
#define xlHAlignGeneral 1
#define xlVAlignTop    -4160
#define xlVAlignBottom -4107

#define xlContinuous    1
#define xlDiagonalDown  5
#define xlDiagonalUp    6
#define xlEdgeBottom    9
#define xlEdgeLeft  7
#define xlEdgeRight     10
#define xlEdgeTop   8
#define xlLineStyleNone     -4142
#define xlNone xlLineStyleNone
#define xlDouble    -4119

#define xlInsideHorizontal  12
#define xlInsideVertical    11

#define xlMedium    -4138
#define xlThick     4
#define xlThin  2

#define xlAutomatic -4105

#define xlSolid 1

#define xlThemeColorDark1  1 // Only Office 2007 and above
#define xlThemeColorLight2 4
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 107 guests