Is there any way in which this can be amended so that the date selected when
the calendar is displayed that the next Sunday is selected (unless the
current day is Sunday then I want the date to be the current date)



Private Sub UserForm_Initialize()

Calendar1 = Now()

End Sub

Re: Calendar Initialize by Rick

Rick
Sun Aug 24 14:01:33 CDT 2008

Try this...

Calendar1 = Now + (8 - Weekday(Now)) Mod 7

Rick


"Patrick C. Simonds" <ordnance1@comcast.net> wrote in message
news:uuPdxjhBJHA.1180@TK2MSFTNGP04.phx.gbl...
> Is there any way in which this can be amended so that the date selected
> when the calendar is displayed that the next Sunday is selected (unless
> the current day is Sunday then I want the date to be the current date)
>
>
>
> Private Sub UserForm_Initialize()
>
> Calendar1 = Now()
>
> End Sub


Re: Calendar Initialize by Gary

Gary
Sun Aug 24 14:01:28 CDT 2008

maybe something like this:

If Weekday(Date, vbSunday) = 1 Then
Calendar1 = Date
Else
Calendar1= Date + 8 - Weekday(Date, vbSunday)
End If

--


Gary


"Patrick C. Simonds" <ordnance1@comcast.net> wrote in message
news:uuPdxjhBJHA.1180@TK2MSFTNGP04.phx.gbl...
> Is there any way in which this can be amended so that the date selected when
> the calendar is displayed that the next Sunday is selected (unless the current
> day is Sunday then I want the date to be the current date)
>
>
>
> Private Sub UserForm_Initialize()
>
> Calendar1 = Now()
>
> End Sub