In spreadsheet 1 I have a list of codes ('00001, '00045, 'J1364 etc - not all are numeric). They are displaying fine as Text in xls 1.
I need to essentially copy them to xls 2. I run the following code:
It works and basically "copies" the range. But reformats my values to (1, 45, 'J1364). My target column is defined as Text. Doesn't seem to matter. I have also tried to wrap the equation to the right of the "=" in a Format( value, "00000"). I also tried string( "0", value). I just get mismatches on that. I actually do make it work by formatting the target column as "Text". My only concern with that is that it is subject to change my users. Maybe this is as good as it gets?
I wish Excel would not mess with some text values! Thoughts?
Thanks,
Dave
I need to essentially copy them to xls 2. I run the following code:
Code:
oWB1.Sheets(1).Range(Cells(r1, cPaste).Address, Cells(r1 + rHeight, cPaste).Address).Value = oWB2.Sheets(1).Range(Cells(rStart, 1).Address, Cells(rStart + rHeight, 1).Address).Value
It works and basically "copies" the range. But reformats my values to (1, 45, 'J1364). My target column is defined as Text. Doesn't seem to matter. I have also tried to wrap the equation to the right of the "=" in a Format( value, "00000"). I also tried string( "0", value). I just get mismatches on that. I actually do make it work by formatting the target column as "Text". My only concern with that is that it is subject to change my users. Maybe this is as good as it gets?
I wish Excel would not mess with some text values! Thoughts?
Thanks,
Dave