Hi Guy,s firstly i sincerely you are all well and staying safe through these unprecedented times
This should be easier than i am trying to make it, how can i return the dates in an input box for the next 4 Wednesday's / Thursday dates
So if it is Tuesday Today then return Wednesday / Thursday dates of THIS week as the 1st date then the next 4 weeks dates
If it is Wednesday today then return next Wednesday / Thursday dates NEXT week then the next 3 weeks dates as we have disregarded this week as it is already Wednesday
When i test the below, the inputbox comes with False in it, i am unsure if the "now" is including hours, minutes and seconds so that is why i tried Formatting the Date Add lines
This should be easier than i am making it!!
The result i am looking for is for an input box to come up with the next 4 Wednesday / Thursday dates and by adding a number, it returns the Wednesday date selected by the input box number
Once i can work the first 2 then i can follow the correct method and add 4 cases to the input box
Hope all of this makes sense
Code:
Dim Wed1 As Date, Wed2 As Date, Wed3 As Date, wed4 As DateDim thur1 As Date, thur2 As Date, thur3 As Date, thur4 As Date
Dim DateOffer As String
Dim optInput As Integer
Wed1 = Format(DateAdd("d", 8 - Weekday(Now, vbWednesday), Now), "dddd-dd-mmmm-yyyy")
thur1 = Format(DateAdd("d", 9 - Weekday(Now, vbThursday), Now), "dddd-dd-mmmm-yyyy")
Wed2 = Format(DateAdd("d", 15 - Weekday(Now, vbWednesday), Now), "dddd-dd-mmmm-yyyy")
thur2 = Format(DateAdd("d", 16 - Weekday(Now, vbThursday), Now), "dddd-dd-mmmm-yyyy")
optInput = InputBox("Enter Which Date To Provisionally Add ?" & vbNewLine & vbNewLine & _
"1" = Wed1 & "-" & thur1 & vbNewLine & _
"2" = Wed2 & "-" & thur2, "WHICH WEEK ?")
Select Case OptInput
Case 1
DateOffer = Wed1 & " / " & thur1
Case 2
DateOffer = Wed2 & " / " & thur2
End Select