Before the 'End With' statement, try
.Range("A5:F798").NumberFormat = "000000.00"
You'd need to adjust "000000.00" for your data ...
"DavidW" wrote:
I'm importing a report from another workbook. How can I format column A
of the destination with leading zeros in the code below? The source is
formatted as General. Thanks.
Code:
--------------------
Dim wb As Workbook
Application.ScreenUpdating = False
Set wb = Workbooks.Open("C:\FOReport.xls", True, True)
With ThisWorkbook.Worksheets("Report")
.Range("A5:F798") = ""
.Range("A5:F798").Value = wb.Worksheets("Report").Range("C7:H80").Value
End With
--------------------
--
DavidW
------------------------------------------------------------------------
DavidW's Profile: http://www.excelforum.com/member.php...o&userid=32630
View this thread: http://www.excelforum.com/showthread...hreadid=534117