View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
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