无法通过时粘贴范围的问题

我有5个客户文件,我想用下面的VBA代码清理。 一切顺利,一切顺利。 然而; 当我运行代码时,错误的范围被粘贴了。我已经花了一些时间来彻底重写我的范围引用,以避免使用.Select在任何地方。 这似乎没有帮助。 有任何想法吗?

Sub convert_Customer() Dim xl As Excel.Application Dim wkbks As Workbooks Dim wksht As Worksheet Dim Rng As Range Dim StartCell As Range Dim Dir As String Dim LastRow As Long Dim LastColumn As Long Application.CutCopyMode = True Application.DisplayAlerts = False Dir = "C:\Users\User\Documents\User\Customer\BI Input" Excel.Workbooks.Open Dir & "\Customer.xlsx" With Excel.Workbooks("Customer.xlsx").Sheets(1).Activate Set StartCell = Range("F15") LastRow = StartCell.SpecialCells(xlCellTypeLastCell).Row LastColumn = StartCell.SpecialCells(xlCellTypeLastCell).Column Set Rng = Range(StartCell, Cells(LastRow, LastColumn)) Rng.Select Rng.Copy End With Application.Workbooks.Add Set wksht = Application.ActiveSheet wksht.Range("A1").PasteSpecial Paste:=xlPasteValues wksht.Range("A:A,C:G").NumberFormat = "@" wksht.Range("B:B,H:CD").NumberFormat = "0.00" Excel.Application.ActiveWorkbook.SaveAs Dir & "/Customer.csv", xlCSV Excel.Workbooks("Customer.csv").Close Excel.Workbooks("Customer.xlsx").Close Application.CutCopyMode = False Application.DisplayAlerts = True End Sub