Maybe...
While Weekday(dat) < vbSunday And _
Weekday(dat) < vbSaturday
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"MicrosoftNews"
wrote in message
Hi all,
I need help on VBA in XL2003 / XP Home.
I want to add a additional function to a while/do loop. I want to check by
vba the saturdays AND sundays in my calendar and mark it.
Private Sub TageFärben(DestTable As Worksheet, ByVal Kalenderjahr As
Integer)
Dim dat As Date
Dim AInterior As Interior
Set AInterior = TabPublics.Range(CFormatCellRange).Interior
dat = DateSerial(Kalenderjahr, 1, 1)
While Weekday(dat) < vbSunday 'here I want to check also the saturdays !
dat = dat + 1
Wend
Do
SetzeTagesfarbeVonDatum dat, DestTable, AInterior
dat = dat + 7
Loop While Year(dat) = Kalenderjahr
End Sub
Who can help ???
Thanks in advance.