LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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


 
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
setting cell values based on a 3rd cell Bob Excel Worksheet Functions 4 March 30th 10 08:53 PM
when setting a cell to equal a blank cell it displays 0 BWildeRed Excel Worksheet Functions 2 January 5th 10 07:04 AM
Dynamically setting CELL COLORS based on TWO OTHER cell values Tom Excel Discussion (Misc queries) 3 February 22nd 09 07:34 PM
Setting a cell equal to another worksheet cell fails (sometimes) Richard Excel Worksheet Functions 2 March 10th 06 04:11 AM
My cell will not advance to next cell setting at enter! Cell advance at enter Setting up and Configuration of Excel 2 October 14th 05 01:21 AM


All times are GMT +1. The time now is 04:07 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"