A
Al
XL2003 on XP
I’m using a Ron de Bruin macro to merge all data from workbooks in a
folder(1), but it converts numeric text with leading zeros into numbers when
it copies the data. The relevant portion of code is:
Set destRange = BaseWks.Range("A" & rnum)
'we copy the values from the sourceRange to the destRange
With sourceRange
Set destRange = destRange.Resize(.Rows.Count, .Columns.Count)
End With
destRange.Value = sourceRange.Value
Can I prevent that from happening, or do I need another macro to add the
zeros back?
I’m using a Ron de Bruin macro to merge all data from workbooks in a
folder(1), but it converts numeric text with leading zeros into numbers when
it copies the data. The relevant portion of code is:
Set destRange = BaseWks.Range("A" & rnum)
'we copy the values from the sourceRange to the destRange
With sourceRange
Set destRange = destRange.Resize(.Rows.Count, .Columns.Count)
End With
destRange.Value = sourceRange.Value
Can I prevent that from happening, or do I need another macro to add the
zeros back?