HI,
I have used the following code to copy values from a source file into a target one.
However once the values are pasted they are not formated as numbers anymore.
What needs to be added to the code/ how does it have to changed so that the values are converted back number Format.
Can someone help`?
Many thanks for your help
Cells.ClearContents
Range("A2").CopyFromRecordset rs
Dim cell As Range, i As Long
With Range("A1").CurrentRegion
For i = 0 To rs.Fields.Count - 1
.Cells(1, i + 1).Value = rs.Fields(i).Name
Next i
.EntireColumn.AutoFit
End With
End Sub
Bookmarks