LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Conditional Formatting through VBA ODBC

JLGWhiz wrote:
Not sure which event would work in your case, but the Worksheet_Change does
not appear to be the correct one. Maybe Worksheet_Activate? Or tag this
macro onto the tail end of your download code.

Can anyone point me in the right direction with this Macro.

[quoted text clipped - 34 lines]
Application.EnableEvents = True
End Sub



I decided to try a different method:-

' Refresh ODBC
Range("D8").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Range("D8").Select



For I = 1 To 100

With ActiveSheet.Cells(I, 4) 'COL 4 = COL D

If .Value = "123" Then
.Interior.ColorIndex = 3

ElseIf .Value = "456" Then
.Interior.ColorIndex = 4

ElseIf .Value = "789" Then
.Interior.ColorIndex = 5

ElseIf .Value = "abc" Then
.Interior.ColorIndex = 6

'etc


End If
End With
Next


I don't suggest it's smart, only that it works.

Thanks for your reply, and to others on my wrongly posted thread

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200805/1

 
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
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 0 January 15th 07 04:35 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 02:04 AM.

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

About Us

"It's about Microsoft Excel"