我有一个VBA脚本,它结合了一堆Excel文件中的数据并整齐地呈现结果。 它通过打开一个输入文件,复制所需的数据范围并将其粘贴到结果文件中来反复进行。在Excel 2013中粘贴错误VBA
我们只是升级到Office 2013,以及一些膏是要在错误的位置,例如:
Workbooks(currentBook).Sheets("InputList").Range("E1:F1000").Copy
ThisWorkbook.Sheets("Results").Range("B2").PasteSpecial Paste:=xlPasteValuesAndNumberFormats
不粘贴到单元格B2而是J1。
Location Date Value
Location Date Value
Location Date Value
通过执行以下代码:
应该给另一个复制粘贴操作
Workbooks(currentBook).Sheets("Pay").Range("B1:B2").Copy
ThisWorkbook.Sheets("Problem Sheets").Range("E1").PasteSpecial Paste:=xlPasteValuesAndNumberFormats
ThisWorkbook.Sheets("Problem Sheets").Range("E1:E2").Copy
ThisWorkbook.Sheets("Problem Sheets").Range("A" & problemCell).PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Transpose:=True
ThisWorkbook.Sheets("Problem Sheets").Range("E1:E2").ClearContents
problemCell = problemCell + 1
是不是结束了:
Location Location Value
Location Location Value
Blank Blank Value
我真的很感激任何帮助理解和处理这种行为 - 我需要能够相信结果s文件,在Office 2010中我可以!
啊,不知道这是怎么爬的。你对这个错误是正确的,但是这个改变后问题依然存在。 –