Conditional Formatting Date()

G

Guest

I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
G

Guest

Thanks for your reply Brian
I have been playing with the Weekday function and even with you suggestion,
I still get every unbound text box changing colors using the expression
provided. All days change even if they are 2,3,4,5,6.. Could this be casue by
the method I'm using the Date() function?

Brian said:
Set Condition1 to be Expression Is, and enter this:

Weekday([FieldName])=1 Or Weekday([FieldName])=7

1 is Sunday, 7 is Saturday. See the VBA help on the Weekday function.

Bugman said:
I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
G

Guest

Hmmm...it works fine for me. Make sure that the expression in each box refers
to itself, not all to the same box

Box 1 expression: Weekday([Day1])=1 Or Weekday([Day1])=7
Box 2 expression: Weekday([Day2])=1 Or Weekday([Day2])=7

etc.


Box 7 expression: Weekday([Day7])=1 Or Weekday([Day7])=7

Where Day1 through Day7 are the names of the unbound boxes.


Bugman said:
Thanks for your reply Brian
I have been playing with the Weekday function and even with you suggestion,
I still get every unbound text box changing colors using the expression
provided. All days change even if they are 2,3,4,5,6.. Could this be casue by
the method I'm using the Date() function?

Brian said:
Set Condition1 to be Expression Is, and enter this:

Weekday([FieldName])=1 Or Weekday([FieldName])=7

1 is Sunday, 7 is Saturday. See the VBA help on the Weekday function.

Bugman said:
I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
G

Guest

Good Call - How did you know I made that mistake. Thanks very much for your
assistance. Appreciate the help.

Brian said:
Hmmm...it works fine for me. Make sure that the expression in each box refers
to itself, not all to the same box

Box 1 expression: Weekday([Day1])=1 Or Weekday([Day1])=7
Box 2 expression: Weekday([Day2])=1 Or Weekday([Day2])=7

etc.


Box 7 expression: Weekday([Day7])=1 Or Weekday([Day7])=7

Where Day1 through Day7 are the names of the unbound boxes.


Bugman said:
Thanks for your reply Brian
I have been playing with the Weekday function and even with you suggestion,
I still get every unbound text box changing colors using the expression
provided. All days change even if they are 2,3,4,5,6.. Could this be casue by
the method I'm using the Date() function?

Brian said:
Set Condition1 to be Expression Is, and enter this:

Weekday([FieldName])=1 Or Weekday([FieldName])=7

1 is Sunday, 7 is Saturday. See the VBA help on the Weekday function.

:

I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 
G

Guest

I've paid the price for making lots of those oversights myself...that's how I
know.

Bugman said:
Good Call - How did you know I made that mistake. Thanks very much for your
assistance. Appreciate the help.

Brian said:
Hmmm...it works fine for me. Make sure that the expression in each box refers
to itself, not all to the same box

Box 1 expression: Weekday([Day1])=1 Or Weekday([Day1])=7
Box 2 expression: Weekday([Day2])=1 Or Weekday([Day2])=7

etc.


Box 7 expression: Weekday([Day7])=1 Or Weekday([Day7])=7

Where Day1 through Day7 are the names of the unbound boxes.


Bugman said:
Thanks for your reply Brian
I have been playing with the Weekday function and even with you suggestion,
I still get every unbound text box changing colors using the expression
provided. All days change even if they are 2,3,4,5,6.. Could this be casue by
the method I'm using the Date() function?

:

Set Condition1 to be Expression Is, and enter this:

Weekday([FieldName])=1 Or Weekday([FieldName])=7

1 is Sunday, 7 is Saturday. See the VBA help on the Weekday function.

:

I have a row of text boxes in which I use the Date()+x to give me a running
calendar column headings. In the Control Source of each box I have =Date()
=Date()+1 =Date()+2 and so on dwn the line. I hae the text box formatted like
m/dd ddd to identify calendar dates. My task is to have the days that are
either Saturday or Sunday turn a different color as the days roll across the
row of text boxes. I can't seem to identify the Sat or Sun in the conditional
formating. Can this be done?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Date Formatting 1
Conditional formatting date color for weekends 4
Form Date issue 2
How to display database in a calendar format 22
Excel Highlight date ranges 1
Scheduling 1
Conditional Formatting of date 1
Excel Conditional Formatting 1

Top