#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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 ...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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 ...


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default 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 ...


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet went grey! AC Excel Worksheet Functions 1 February 5th 09 11:18 AM
How to get a lighter shade of grey for fill color? LurfysMa New Users to Excel 2 March 14th 07 04:38 AM
Grey out cell Angela1979 Excel Worksheet Functions 13 March 8th 07 09:16 PM
Grey box olofcitifig Charts and Charting in Excel 1 May 6th 05 06:09 PM
Grey out Pete Wright Excel Programming 0 April 14th 04 03:48 PM


All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"