PC Review


Reply
Thread Tools Rate Thread

Day test question

 
 
Patrick C. Simonds
Guest
Posts: n/a
 
      13th Nov 2008
The code below ensures that the date selected (on Calendar1) is a Thursday
and works fine. The intent here to create an annual vacation book, and
because of how the book is printed it needs to start on a Thursday.
Calendar1 is set to show the month of January when it opens.

What I need now is some way to amend the code so that if January 1 does not
fall on a Thursday, that they can only select the Thursday prior to January
1.




Sub Thursday_Test()

Dim MyDate, MyWeekDay
MyDate = DVal '= Date selected on Calendar1
MyWeekDay = Weekday(MyDate)

If MyWeekDay = 5 Then
ActiveCell.Value = DVal
Unload Calendar

RenameWorksheets.Rename_Worksheets

Exit Sub

End If
Unload Calendar
WrongDay.Show

End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
test question captvic Microsoft Frontpage 1 13th Apr 2009 01:47 PM
Re: test question 2 Peter Morris Microsoft C# .NET 0 20th Feb 2009 02:06 PM
separating test data from test code + creating skeleton unit test classes QA Guy Microsoft C# .NET 0 6th Apr 2005 10:00 AM
separating test data from test code + creating skeleton unit test classes qualityassurance@gmail.com Microsoft C# .NET 0 6th Apr 2005 09:38 AM
mcp test question frank-shie Microsoft VB .NET 3 30th Nov 2004 01:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:03 AM.