Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default change cell color..

Hi,
How do I change the color in a cell.

something like....
after this...
xlBook.Worksheets(3).Range("A1") = Date()

i want to do something like this....
xlBook.Worksheets(3).Range("A1").forecolor = Red


thanks in advance,
bob mcclellan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default change cell color..


With (range object).Interior
.ColorIndex = 35
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With

"John 3:16" wrote:

Hi,
How do I change the color in a cell.

something like....
after this...
xlBook.Worksheets(3).Range("A1") = Date()

i want to do something like this....
xlBook.Worksheets(3).Range("A1").forecolor = Red


thanks in advance,
bob mcclellan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default change cell color..

xlBook.Worksheets(3).Range("A1").interior.color = vbRed

or
.... .color = RGB(255,0,0)

Tim


--
Tim Williams
Palo Alto, CA


"John 3:16" wrote in message
...
Hi,
How do I change the color in a cell.

something like....
after this...
xlBook.Worksheets(3).Range("A1") = Date()

i want to do something like this....
xlBook.Worksheets(3).Range("A1").forecolor = Red


thanks in advance,
bob mcclellan




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default change cell color..

Great !
thanks guys...
I really appreciate it.

bob mcclellan

"John 3:16" wrote in message
...
Hi,
How do I change the color in a cell.

something like....
after this...
xlBook.Worksheets(3).Range("A1") = Date()

i want to do something like this....
xlBook.Worksheets(3).Range("A1").forecolor = Red


thanks in advance,
bob mcclellan



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
Change tab color based on current color of a cell MarkT Excel Discussion (Misc queries) 0 May 22nd 08 05:46 PM
Can you change the color of one cell based on the color of another andoscott Excel Discussion (Misc queries) 4 May 4th 07 04:02 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


All times are GMT +1. The time now is 01:53 AM.

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

About Us

"It's about Microsoft Excel"