4 x List boxes (set up to look like above) 1 x Command button 1 x
Label
Option Explicit
'--------
Private Sub Form_Load() Dim i As Integer List1.AddItem
"1st" List1.AddItem "2nd" List1.AddItem "3rd" List1.AddItem
"4th" List1.AddItem "Last" For i = 1 To 12 If i < 8 Then
List2.AddItem WeekdayName(i, , vbSunday) List3.AddItem
MonthName(i) List4.AddItem (1999 + i) Next End Sub
'--------
Private Sub Command1_Click() Dim yr As Integer: yr =
CInt(List4.Text) Dim mth As Integer: mth = List3.ListIndex + 1 Dim
dayOfWeek As Integer: dayOfWeek = List2.ListIndex + 1 Dim weekOfMonth As
Integer: weekOfMonth = List1.ListIndex + 1 Dim firstOfMonth As Date Dim
dateRequired As Date
If weekOfMonth = 5 Then mth = mth + 1 weekOfMonth =
0 End If firstOfMonth = DateSerial(yr, mth, 1)
dateRequired = firstOfMonth - Weekday(firstOfMonth, (dayOfWeek Mod 7) + 1)
+ (7 * weekOfMonth) Label1.Caption = Format$(dateRequired, "dd mmm
yyyy") End Sub