Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to programatically change the background color of
a range of cells. Currently I can only change the font color. I am using VB.Net 2003 with Library 9.0 for Excel 2k Here is a very short snippet of what is causing me trouble. With WSRange (Excel.Range) .Value = someArray (Same size as WSRange) .Font.Color = color (hex number) End With but I cant do this: WSRange.Font.BackGround = color (hex number) Also setting the color gives me trouble. The default VB.NET color settings for yellow shows up as a very bright blue. I created some of my own with trial and error, but where is the color listing? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Instead of:
WSRange.Font.BackGround = color (hex number) try: WSRange.Interior.ColorIndex = (find the colorindexes in VBA help) or WSRange.Interior.Color = RGB(255, 0, 0) ' For red Mark --- Mark Bigelow mjbigelow at hotmail dot com http://hm.imperialoiltx.com *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fill background color automatically by typing a letter in a cell | Excel Discussion (Misc queries) | |||
Excel doesn't print the background fill color chosen for a cell | Excel Worksheet Functions | |||
Fill Part of Chart Background with second color | Excel Discussion (Misc queries) | |||
Default Border, Font Color, and Cell Background Color | Excel Discussion (Misc queries) | |||
tab background fill - color | New Users to Excel |