Change color on excel sheet from Access

bugsy

Registered User.
Local time
Today, 12:43
Joined
Oct 1, 2007
Messages
99
Hey

I have access query opening in excel. After it opens i would like everywher where where is says "no", to make next 2 cells BLUE.

The code below is doing it, but it's taking few minutes.
is there any way to speed it up ?

Code:
'shading non-matching items
With objActiveWkb.Worksheets("Reconciliation Sheet").Range("b5:ak500")
    Set c = .Find("No", , , xlWhole, , , True)
    If Not c Is Nothing Then
        sAddress = c.Address
        Do
            c.Offset(, -2).Resize(, 3).Interior.Pattern = xlSolid
            c.Offset(, -2).Resize(, 3).Interior.ColorIndex = 33
            Set c = .FindNext(c)
        Loop While Not c Is Nothing And c.Address <> sAddress
    End If
End With
 
Have you tried conditonal formatting?

hey Keith
i am afraid i don't know how with Conditional Formatting format cell other then the one(s) you looking at.
i.e. If cell (c5) = NO, i'd like cells (C3:24) to become green.
 

Users who are viewing this thread

Back
Top Bottom