LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Calendar Initialize

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" wrote in message
...
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



 
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
Userform Initialize [email protected] Excel Programming 4 August 7th 07 06:01 AM
UserForm initialize Arne Hegefors Excel Programming 8 September 8th 06 01:48 PM
userform initialize Patrick Simonds Excel Programming 1 August 4th 06 11:14 PM
Initialize an array Kleev Excel Programming 6 December 1st 05 06:09 PM
Initialize macro Tom Jung Excel Programming 1 October 31st 05 04:04 AM


All times are GMT +1. The time now is 09:06 PM.

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"