Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am copying a large range, nealy 60K rows. One of the colums has a 15 digit
number in it. The destination cell is pre-formatted as text, and I want to keep it that way. However when I copy the range from the CSV file to the template, the formatting goes with it. Code below, how can I maintain the formatting I have in the destination sheet? Dim iLastRow As Long Dim sFile1 As String Dim wb, wkbkCSV As Workbook Dim rDestCell As Range sFile1 = Application.GetOpenFilename("CSV Files, *.csv") If sFile1 = "False" Then Exit Sub End If Set rDestCell = Workbooks("Sessions.xlsm").Worksheets("Sheet1").Ra nge("A2") Set wkbkCSV = Workbooks.Open(Filename:=sFile1) With wkbkCSV .Worksheets(1).UsedRange.Copy Destination:=rDestCell .Close savechanges:=False End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
condionally formatting based on another cells formatting? | Excel Discussion (Misc queries) | |||
Find formatting in text in cell, insert tags around formatting. | Excel Programming | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
expanding custom formatting without removing existing cell formatting? | Excel Worksheet Functions | |||
Decimal Formatting in Windows English vs European Formatting | Excel Programming |