#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Help Please

Hi All,
I have developed an application using Visual Basic & Access. My query is i
am getting the report from access database to excel while exporting data from
access to excel i want all the cell with NO to be filled with red color this
can be done by conditional formatting but i want this to be automated as soon
this is extracted from access database.

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Help Please

You can add the CF in the code that gets the data

Dim rng As Range


Set rng = Range("A:B") '<=== change to suit
rng.FormatConditions.Delete
rng.FormatConditions.Add Type:=xlExpression, Formula1:="=RC=""Yes"""
rng.FormatConditions(1).Interior.ColorIndex = 3
Set rng = Nothing


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"kiran" wrote in message
...
Hi All,
I have developed an application using Visual Basic & Access. My query is i
am getting the report from access database to excel while exporting data
from
access to excel i want all the cell with NO to be filled with red color
this
can be done by conditional formatting but i want this to be automated as
soon
this is extracted from access database.

TIA



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



All times are GMT +1. The time now is 10:12 PM.

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"