I have a macro that is activated using Windows Speech Recognition. When the macro is executed, i have a line of code that will repeat back to me as a confirmation. Most of the time the macro executes perfectly, however, on occasions, the function will still be performed but the final line of code, which is:
Application.Speech.Speak "just1"
produces the following error:
Run-time error '287': Application-defined or object-defined error
Does anyone know what could cause this intermittent problem?
Here is my full macro for referennce.
Many thanks
Sub just1()
Dim result As String
Dim sheet As Worksheet
Set sheet = ActiveWorkbook.Sheets("raw")
result1 = Application.WorksheetFunction.VLookup(1, sheet.Range("Y5:Z44"), 2, False)
Sheet3.Cells(4, 2) = result1
Application.Speech.Speak "just1"
End Sub
Application.Speech.Speak "just1"
produces the following error:
Run-time error '287': Application-defined or object-defined error
Does anyone know what could cause this intermittent problem?
Here is my full macro for referennce.
Many thanks
Sub just1()
Dim result As String
Dim sheet As Worksheet
Set sheet = ActiveWorkbook.Sheets("raw")
result1 = Application.WorksheetFunction.VLookup(1, sheet.Range("Y5:Z44"), 2, False)
Sheet3.Cells(4, 2) = result1
Application.Speech.Speak "just1"
End Sub