View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson[_2_] Chip Pearson[_2_] is offline
external usenet poster
 
Posts: 95
Default Newbie needs help

Mark,

Try something like the following:
Dim R As Range
Dim Rng As Range
Dim WS As Worksheet
Dim ColorRed As Boolean
Dim ColorRowRed As Boolean
Set WS = Worksheets.Add

WS.Range("A1:D10").BorderAround xlSolid, xlThick, 6
For Each R In Range("A1:D10").Rows
ColorRowRed = Not ColorRowRed
ColorRed = ColorRowRed
For Each Rng In R.Cells
If ColorRed = True Then
Rng.Interior.ColorIndex = 3
Else
Rng.Interior.ColorIndex = 4
End If
ColorRed = Not ColorRed
Next Rng
Next R


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"MarkJones" wrote in
message ...

This is probably very easy to do, however I've got no clue as

to what
I'm doing...

Basically I need to program a macro to do the following...

1. Create a new Sheet in an Excel Workbook
2. Draw a grid from Cells A:1 to D:10
3. Format the grid with thick lined borders in Yellow
4. Colour each cell with alternate Red and green colours.

Now I've made an effort and I've got 1 done (I think)

Insert New WorkSheet

Any help would be really appriciated as this is very important

that I
actually complete this.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/