Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default formatcondition,,, curious....

1.
set rng=[a1:a9]
rng.select
with selection
~~~~abuout formatcondition
end with

2.
set rng=[a1:a9]
with rng
~~~~abuout formatcondition
end with

curiously, number 1 is work out... but, number 2 is not work... why?????


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default formatcondition,,, curious....

Can you post the rest of the code... It is a little tought to comment without
seeing what is failing...
--
HTH...

Jim Thomlinson


"x taol" wrote:

1.
set rng=[a1:a9]
rng.select
with selection
~~~~abuout formatcondition
end with

2.
set rng=[a1:a9]
with rng
~~~~abuout formatcondition
end with

curiously, number 1 is work out... but, number 2 is not work... why?????


*** Sent via Developersdex http://www.developersdex.com ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default formatcondition,,, curious....

rdz.Select
With Selection
.FormatConditions.Delete
If .Resize(.Rows.Count, 1).Count = 1 Then Exit Sub
adr = .Cells(1).Address(0, 0)
adr2 = .Resize(.Rows.Count, 1).Address(1, 0)
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=MAX(" & adr2 & ")=" & adr
.FormatConditions(1).Font.Color = vbRed
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=IF(COUNTIF(" & adr2 & ",0)0,SMALL(" & adr2 &
",COUNTIF(" & adr2 & ",0)+1)=" & adr & ",MIN(" & adr2 & ")=" & adr & ")"
.FormatConditions(2).Font.Color = vbBlue
End With

the upper source 2 line.... is replaced below follow 1 line.
with rdz

and then, if I run that macro, the adr indicate wrong address curiously.

*** Sent via Developersdex http://www.developersdex.com ***
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
updating Excel.FormatCondition greg Excel Programming 1 April 19th 07 10:12 PM
Determining What FormatCondition Has Been Chosen John/Churchwell Excel Programming 6 August 11th 06 09:34 PM
Just curious famdamly Excel Discussion (Misc queries) 2 December 7th 05 01:33 AM
Just curious RedChequer Excel Discussion (Misc queries) 3 March 10th 05 11:15 PM
Just Curious Mike Fogleman Excel Programming 7 September 30th 04 08:04 AM


All times are GMT +1. The time now is 07:41 AM.

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"