Private Sub Worksheet_Change(ByVal Target As Range)
a = Target.Row()
b = Target.Column()
Application.ScreenUpdating = False
If a <> 1 Then
If Cells(a, b) = "" And Cells(a - 1, b) <> "" Then
For x = 1 To 256
If Cells(a - 1, x).HasFormula = True Then
Cells(a - 1, x).Copy
Cells(a, x).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End If
Next x
Cells(a, b).Select
End If
End If
Application.ScreenUpdating = True
End Sub
我复制别人个VBA程序,执行时老是显示编译错误,缺少end sub,请帮我看下是为什么
能把你编辑的全部的包括标识行,包括最后的那一行,全复制给我看看吗?我的错误提示老显示是第一行sub ()那一行错误
追答我试了试,除了公式里不能有函数外没什么问题,我不清楚你遇到的问题.
本回答被网友采纳