I am moving a text value from one worksheet in an Excel 2002 workbook to another worksheet and have placed a watchpoint in my code for the values of the cells. The source value is '06071' where the number is a valid text entry, while the target value is '6071' where the zero was dropped because VB interpreted this as a number not as a text field as intended.
The code snippet looks like the following:
Worksheets(Importfilename).Cells(entryrow, 2).Value = Str(Worksheets("Entry"
.Cells(4, 2).Value) 'Comm ID
I added the STR() function to force the value on the worksheet "Importfilename" to be a text value but instead it drops the zero and is a number value.
How can I make the target a string value and keep the source text value of '06071'?
Thanks!
The code snippet looks like the following:
Worksheets(Importfilename).Cells(entryrow, 2).Value = Str(Worksheets("Entry"
I added the STR() function to force the value on the worksheet "Importfilename" to be a text value but instead it drops the zero and is a number value.
How can I make the target a string value and keep the source text value of '06071'?
Thanks!