find substring and display message box
I have a set of dates in excel that I need to be able to loop through however the starting dates are not always on the first and so I need to be able to determine the day but not the year or month. What I have is not working
Code:
checkDates (ActiveCell.Value)
Please note that there is a difference in the case statements simply because I am trying to get the first one to work and then I will modify the rest based off of that one.
Code:
Sub checkDates(day As String)
Dim mth As String
Dim dy As String
Dim yr As String
'MsgBox day
Select Case day
Case1 "/1/" Like "*" & day & "*":
MsgBox "day one"
Case day Like "*/2/*"
Case day Like "*/3/*":
Case day Like "*/4/*":
Case day Like "*/5/*":
Case day Like "*/6/*":
Case day Like "*/7/*":
Case Else
MsgBox "test"
End Select
Thank you