Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how would you change these....
to work without using select? i know a lot of you say not to use it.
Range("J8:O27").Select Selection.Font.Bold = False Range("I8").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=MOD(ROW(),2)=1" With Selection.FormatConditions(1).Borders(xlLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With Selection.FormatConditions(1).Interior.ColorIndex = 37 -- Gary |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how would you change these....
Dim rng As Range
Range("J8:O27").Font.Bold = False Set rng = Range(Range("I8"), Range("I8").End(xlToRight).End(xlDown).Offset(-1, 0)) With rng .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:= _ "=MOD(ROW(),2)=1" With .FormatConditions(1).Borders .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With .FormatConditions(1).Interior.ColorIndex = 37 End With Tim "Gary Keramidas" wrote in message ... to work without using select? i know a lot of you say not to use it. Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=MOD(ROW(),2)=1" With Selection.FormatConditions(1).Borders(xlLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With Selection.FormatConditions(1).Interior.ColorIndex = 37 -- Gary |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how would you change these....
thanks tim
-- Gary "Tim Williams" <saxifrax@pacbell*dot*net wrote in message ... Dim rng As Range Range("J8:O27").Font.Bold = False Set rng = Range(Range("I8"), Range("I8").End(xlToRight).End(xlDown).Offset(-1, 0)) With rng .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:= _ "=MOD(ROW(),2)=1" With .FormatConditions(1).Borders .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With .FormatConditions(1).Interior.ColorIndex = 37 End With Tim "Gary Keramidas" wrote in message ... to work without using select? i know a lot of you say not to use it. Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Select Selection.FormatConditions.Delete Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=MOD(ROW(),2)=1" With Selection.FormatConditions(1).Borders(xlLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.FormatConditions(1).Borders(xlBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With Selection.FormatConditions(1).Interior.ColorIndex = 37 -- Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel graphs change when pasted into Publisher - Metafiles change? | Charts and Charting in Excel | |||
Excel bar chart formatting of bars to change colors as data change | Excel Discussion (Misc queries) | |||
Use date modified to change format & create filter to track change | Excel Worksheet Functions | |||
making copied cells change with change in original cell | Excel Worksheet Functions | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming |