我正在尝试获取代码以“复制粘贴”工作表“ X”中设置为VBA的值。但是它给我一个1004错误... 浏览时似乎找不到解决方案。
希望您能提供帮助。
Sub Probabilities()
Dim VBA As Worksheet
Set VBA = Sheets("X")
Dim Overview As Worksheet
Set Overview = Sheets("Overview")
Overview.Range(Cells(27, 3), Cells(34, 3)).Value = Overview.Range(Cells(40, 3), Cells(47, 3)).Value
VBA.Range(Cells(83, 3), Cells(88, 3)).Value = VBA.Range(Cells(83, 3), Cells(88, 3)).Value
错误在此行VBA.Range(Cells(83, 3), Cells(88, 3)).Value = VBA.Range(Cells(83, 3), Cells(88, 3)).Value
/ Valdemar
答案 0 :(得分:1)
With Overview
.Range(.Cells(27, 3), .Cells(34, 3)).Value = _
.Range(.Cells(40, 3), .Cells(47, 3)).Value
End With
With VBA
.Range(.Cells(83, 3), .Cells(88, 3)).Value = _
.Range(.Cells(83, 3), .Cells(88, 3)).Value
End With