ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Grey Color (https://www.excelbanter.com/excel-programming/302441-grey-color.html)

pcw[_2_]

Grey Color
 

Is the light grey that is available in the color template
(for background colors) in Excel the same as it is in
Visual Basic?

The Excel light gray, which is 190, 190, 190 does not seem
comparable to that (&H00E0E0E0&) found in Visual Basic.
The one found in Visual Basic is what I would prefer,
however, I am working in Excel.

There must be a way to make my light grey in Excel appear
like that in Visual Basic ...

keepITcool

Grey Color
 
that color from VB is probably windows color for 3d objects
vb3dface from the windows XP theme Luna Blue


(it will be different dependent on what the user has chosen for his
interface)

Excel can handle any RGB value, but stores a set of 54 colors in a
workbook (which can be called with .colorINDEX

You can change these colors programatically or simply via
Tools/Options/Colors. (note: it's saved with the workbook)

If you want to assign a cell a specific color gray:
activecell.interior.color = &HC0C0C0 will do.

(note assigning hex you use BGR not RGB sequence)




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"pcw" wrote:


Is the light grey that is available in the color template
(for background colors) in Excel the same as it is in
Visual Basic?

The Excel light gray, which is 190, 190, 190 does not seem
comparable to that (&H00E0E0E0&) found in Visual Basic.
The one found in Visual Basic is what I would prefer,
however, I am working in Excel.

There must be a way to make my light grey in Excel appear
like that in Visual Basic ...



patrick molloy

Grey Color
 

try this....it will give you both the VBA color index for
excel sheets and the equivalent RGBColor value

Sub ShowColors()
Dim ws As Worksheet
Set ws = ActiveWorkbook.Worksheets.Add
Dim rw As Long

For rw = 1 To 57

Cells(rw, 1) = rw - 1
Cells(rw, 2).Interior.ColorIndex = rw - 1
Cells(rw, 3) = Cells(rw, 2).Interior.Color

Next


End Sub



-----Original Message-----
that color from VB is probably windows color for 3d

objects
vb3dface from the windows XP theme Luna Blue


(it will be different dependent on what the user has

chosen for his
interface)

Excel can handle any RGB value, but stores a set of 54

colors in a
workbook (which can be called with .colorINDEX

You can change these colors programatically or simply

via
Tools/Options/Colors. (note: it's saved with the

workbook)

If you want to assign a cell a specific color gray:
activecell.interior.color = &HC0C0C0 will do.

(note assigning hex you use BGR not RGB sequence)




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"pcw" wrote:


Is the light grey that is available in the color

template
(for background colors) in Excel the same as it is in
Visual Basic?

The Excel light gray, which is 190, 190, 190 does not

seem
comparable to that (&H00E0E0E0&) found in Visual

Basic.
The one found in Visual Basic is what I would prefer,
however, I am working in Excel.

There must be a way to make my light grey in Excel

appear
like that in Visual Basic ...


.



All times are GMT +1. The time now is 03:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com