Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default 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
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
Excel graphs change when pasted into Publisher - Metafiles change? Ericd1 Charts and Charting in Excel 0 February 1st 10 01:57 AM
Excel bar chart formatting of bars to change colors as data change JudyT Excel Discussion (Misc queries) 1 January 24th 07 06:07 PM
Use date modified to change format & create filter to track change PAR Excel Worksheet Functions 0 November 15th 06 09:17 PM
making copied cells change with change in original cell Jennifer Mcdermeit Excel Worksheet Functions 2 July 20th 06 04:58 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM


All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"