I'm using the following code which was based on someone else's post on SO. It opens another workbook, copies a sheet and pastes it back into a main workbook. It's "pasting" these values with the resize function, so pastespecial isn't available. The problem is that there are values in the source sheet's S column that are 20+ digits (tracking numbers) and when they get pasted back to the main working book, they are truncated into scientific notation and are lost.
Set SourceFile = Workbooks.Open("C:\users\user\desktop\shipping\tempshipping.xls")
Set DestFile = ThisWorkbook
With SourceFile.Sheets("Sheet1").UsedRange
'I tried using this to set the format of the cells in the source workbook
'to "Text" to fix the problem but I stepped through the code and actually
'checked the file when it's open and it's not doing anything
LastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Range("S2:" & "S" & LastRow).NumberFormat = Text
'you can see here the "paste" method is taking the range value and resizing
'it to the source data, so pastespecial isn't available. I'm not even sure
'doing pastespecial would fix the problem.
'Now, paste to y worksheet:
DestFile.Sheets("DestSheet").Range("A1").Resize( _
.Rows.Count, .Columns.Count) = .Value
End With
'Close TEMP File
SourceFile.Close
.NumberFormat = "@"to format it as text... Gosh...