Grey Color

  • Thread starter Thread starter pcw
  • Start date Start date
P

pcw

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 ...
 
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 >
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top