D
Dick Watson
I was looking at a spreadhseet populated with a data query. It has a series
of cells that are a code that, in present case, happens to be 5 numeric
digits. As returned by the query, ISTEXT() is TRUE. It is not preceeded by a
'. It is cell formatted General (not Text). But the value in the cell is text
not numeric. Text is OK.
So I'm trying to programatically put this value in a cell in another sheet.
I want it to be ISTEXT(), not proceeded by a ' and cell format General. Just
like the query creates.
I've compared properties of the two cells and nothing is different besides
the type of Value2 being Variant/String in one case and Variant/Double in the
other. Yet just assigning .Value2 = CStr(myStringOfDigits) still results in a
Double in the cell.
Surely if the data query can put a string in the cell as a string, VBA can
do the same??!?
Thanks in advance for any thoughts!
of cells that are a code that, in present case, happens to be 5 numeric
digits. As returned by the query, ISTEXT() is TRUE. It is not preceeded by a
'. It is cell formatted General (not Text). But the value in the cell is text
not numeric. Text is OK.
So I'm trying to programatically put this value in a cell in another sheet.
I want it to be ISTEXT(), not proceeded by a ' and cell format General. Just
like the query creates.
I've compared properties of the two cells and nothing is different besides
the type of Value2 being Variant/String in one case and Variant/Double in the
other. Yet just assigning .Value2 = CStr(myStringOfDigits) still results in a
Double in the cell.
Surely if the data query can put a string in the cell as a string, VBA can
do the same??!?
Thanks in advance for any thoughts!