LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Making all past dates bold, looping

Hello guys,

I'm am trying to lock all cell, and make cell content bold until the date of
today is encountered. the range contains dates in the default date format
(this is European style date formatting, thus dd/mm/yyyy). However, it keeps
on looping...

any suggestions about this code?

Sub Button_Click()
Dim currentDate As Date
currentDate = Date

For Each c In Range("D5:D369")
Do Until c = currentDate
c.Font.Color = RGB(0, 255, 0)
c.Locked = True
c.Font.Bold = True
Loop
Next c
End Sub
 
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
recognizing dates past End of Month sk81222 Excel Discussion (Misc queries) 6 June 14th 06 03:43 PM
making cells bold thephoenix12 Excel Programming 1 June 23rd 05 06:34 PM
Past Due - Due Dates melarmor Excel Worksheet Functions 3 June 2nd 05 06:13 AM
How to set up past due notices based on dates Linn Excel Discussion (Misc queries) 3 March 18th 05 06:59 AM


All times are GMT +1. The time now is 01:52 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"