If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Shading cell with VBA

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-17-06, 13:13
tair23 tair23 is offline
Registered User
 
Join Date: Jan 2006
Location: Indiana
Posts: 7
Shading cell with VBA

ok I know some of the code this will happen on a click event of a button:

Dim MyRange as Range
Dim c As Range

Set MyRange = ("B2:FN134)
For each c in MyRange
IF (<cell color>) = (<white>) then (<cell color>) = (<yellow>)
Next C

For all things in < > in need to know the syntax of the code to write this in VBA
Reply With Quote
  #2 (permalink)  
Old 01-17-06, 18:05
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
perhaps:

Code:
If c.Interior.Color = vbWhite Then c.Interior.Color = vbYellow
HTH
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On