I was asked to perform a macro in VBA and I am having a problem that I have to perform an operation with dates, I recover the date in the format "hh, mm" [15:59 ] and trying to make a subtraction between two dates generates an error 13, that the types do not match. Any suggestions that recommend me, the truth I've never done macros. Thank you very much in advance.
h2 = Format(Range(strColumnaC).Value, "hh:mm")
h1 = Format(Range(strColumnaC).Value, "hh:mm")
h3 = h2-h1