Hey all,
I am trying to find the column number where a certain date is located using the match function but I am getting errors.
My code:
txtStartDate is a text box in my form "formMissingTime". I am getting a type mismatch with the last line of code, but I haven't been able to get the stuff above to sucessfully work either. Does anyone know what is going on?
I am trying to find the column number where a certain date is located using the match function but I am getting errors.
My code:
Code:
Dim sDate, As Long
Dim st As Date
st = formMissingTime.txtStartDate.Value
sDate = Application.Match(st, Range("J2:AAA2"), 0)
Range(Columns(sDate)).Select