![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
What is the visual basic code for white I need to know!
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
The ColorIndex for white is 2. Is that what you're talking about? e.g.
Range("A1").Font.ColorIndex = 2 You can type ColorIndex Property into VBA help to get a full list. HTH, D |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
Hi
White is VBA 2, try 1 2 3 4 if unsure or check in help files sure its there. BTW on old borad there was some guru who posted some code that bacgs out all colours in one column and the number next ! very cool if lasy like me.. i must have it some where but not archived in my knowledge base yet sorry, have a look..
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
I had the VBA Code. (Kept it from an earlier post)
Sub ColorIndices() For i = 1 To 56 Cells(i, 1).Interior.ColorIndex = i Cells(i, 2).Value = i Next i End Sub |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|