Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Cell BackColors From VBA
Hi All. I need to create a spreadsheet from VBA in Access and set the
backcolors of certain cells depending on data values. All works well but how do I set the cell/range back colors using VBA? Please Help. Regards |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Cell BackColors From VBA
Maybe this
Range("A1:A6").Interior.ColorIndex = 3 Mike "AndrewDB" wrote: Hi All. I need to create a spreadsheet from VBA in Access and set the backcolors of certain cells depending on data values. All works well but how do I set the cell/range back colors using VBA? Please Help. Regards |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Cell BackColors From VBA
Hi Mike,
Thanks for your quick response. Is there any way that I can set the color using RGB value? Seems the colorindex range is very limited. Andrew -- Kepior Senso Fumor "Mike H" wrote: Maybe this Range("A1:A6").Interior.ColorIndex = 3 Mike "AndrewDB" wrote: Hi All. I need to create a spreadsheet from VBA in Access and set the backcolors of certain cells depending on data values. All works well but how do I set the cell/range back colors using VBA? Please Help. Regards |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Cell BackColors From VBA
Andrew,
Look in Help for the different colours using RGB. This is Blue Range("A1:A6").Interior.Color = RGB(0, 0, 255) Mike "AndrewDB" wrote: Hi Mike, Thanks for your quick response. Is there any way that I can set the color using RGB value? Seems the colorindex range is very limited. Andrew -- Kepior Senso Fumor "Mike H" wrote: Maybe this Range("A1:A6").Interior.ColorIndex = 3 Mike "AndrewDB" wrote: Hi All. I need to create a spreadsheet from VBA in Access and set the backcolors of certain cells depending on data values. All works well but how do I set the cell/range back colors using VBA? Please Help. Regards |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Cell BackColors From VBA
Hi Mike
For some reason my Access VBA does not accept the "= RGB(0,0,255)" code. I'm using Access and Excell 2007. Regards Andrew "Mike H" wrote: Andrew, Look in Help for the different colours using RGB. This is Blue Range("A1:A6").Interior.Color = RGB(0, 0, 255) Mike "AndrewDB" wrote: Hi Mike, Thanks for your quick response. Is there any way that I can set the color using RGB value? Seems the colorindex range is very limited. Andrew -- Kepior Senso Fumor "Mike H" wrote: Maybe this Range("A1:A6").Interior.ColorIndex = 3 Mike "AndrewDB" wrote: Hi All. I need to create a spreadsheet from VBA in Access and set the backcolors of certain cells depending on data values. All works well but how do I set the cell/range back colors using VBA? Please Help. Regards |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setting Cell BackColors From VBA
Why not use the Excel built-in features of Conditional formatting?
Do you need it to be VBA? Sub backcolor() ActiveSheet.Range("A1:G23").Interior.ColorIndex = 3 End Sub Gord Dibben MS Excel MVP On Thu, 8 Oct 2009 07:25:01 -0700, AndrewDB wrote: Hi All. I need to create a spreadsheet from VBA in Access and set the backcolors of certain cells depending on data values. All works well but how do I set the cell/range back colors using VBA? Please Help. Regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
setting cell values based on a 3rd cell | Excel Worksheet Functions | |||
when setting a cell to equal a blank cell it displays 0 | Excel Worksheet Functions | |||
Dynamically setting CELL COLORS based on TWO OTHER cell values | Excel Discussion (Misc queries) | |||
Setting a cell equal to another worksheet cell fails (sometimes) | Excel Worksheet Functions | |||
My cell will not advance to next cell setting at enter! | Setting up and Configuration of Excel |