excel 运行时错误1004范围类的pastespecial方法失败

fhity93d  于 2023-04-13  发布在  其他
关注(0)|答案(1)|浏览(200)

请帮助当我使用这个作为宏...有错误的问题...

Sub Working()
If IsEmpty(ActiveCell.Value) Then
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= \_
xlNone, SkipBlanks:=False, Transpose:=True
End If
If Not IsEmpty(ActiveCell.Value) Then
MsgBox "I'm not empty!"
End If
End Sub

错误代码为blowIf IsEmpty(ActiveCell.Value) Then Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= \_

5lhxktic

5lhxktic1#

Sub Working()

If IsEmpty(ActiveCell.Value) Then 
   Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ 
     xlNone, SkipBlanks:=False, Transpose:=True 
Else 
   MsgBox "I'm not empty!"
End If

End Sub

相关问题