我有以下代码:
Dim FinalAddr As Range
Dim Final As String
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
On Error Resume Next
Select Case UCase(Target.Value)
Case "NEW-BOX"
Selection.Offset(-1, 2).Select
FinalAddr = Range(Selection.Address)
MsgBox FinalAddr ' Debug, nothing comes up however
Selection.ClearContents
Selection.Offset(1, -2).Select
Case "END-BOX"
Final = FinalAddr.Value
Application.Speech.Speak (Final)
End Select
End Sub
但是,当我扫描新盒子时没有任何反应,所有语法都正确吗?我没有错误,任何输入将不胜感激。