So I have a pull-down list in Excel 2003 that is an expanded version of this:
011
012
01T
111
If I type in the cell (rather than using the pulldown) it says 111 (integer) is a type mismatch, but '111 (leading apostrophe makes it a string) works.
So it wants a string. Fine.
Problem is in VBA code ALL of the below says, 'type mismatch'.
Cells("D" & ThisRow) = "01T" ' Doesn't like strings!
Cells("D" & ThisRow) = "111" ' or this string
Cells("D" & ThisRow) = CStr("111") ' or this string
Cells("D" & ThisRow) = "'111" ' With leading apostrophe, to simulate my typing.
Cells("D" & ThisRow) = 111 ' Doesn't like integers!
So if it doesn't like strings or integers...what the heck type is it looking for?
I want to use strings because I need 012 not 12, and 01T has to be a string in any case.