+ Reply to Thread
Results 1 to 4 of 4

Method speak of object speech failed

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Method speak of object speech failed

    Need some help -trying to run a simple speech macro and Im getting the following error.
    Sub Speak()
    Application.ScreenUpdating = False
    Sheets("Test").Activate
    Dim Lastrow As Long
    Dim R1 As Range, R2 As Range, R3 As Range
    
    With Sheet4      ' Change Sheet No. to suit
        For i = 8 To 8
            If .Range("J" & i).Value = .Range("K" & i).Value Or _
               .Range("J" & i).Value = .Range("L" & i).Value Or _
               .Range("K" & i).Value = .Range("L" & i).Value Then
        Application.Speech.Speak "You are not allowed to do that"
     
    End If
        Next i
    End With
    Sheets("Test").Activate
    Application.ScreenUpdating = True
    
    
    End Sub
    Rep for any help to solve above
    Attached Images Attached Images

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Method speak of object speech failed

    Try starting with

    Dim s As Object
    Set s = CreateObject("SAPI.SpVoice")
    Then in the With block

    s.Speak "You are not allowed to do that"
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: Method speak of object speech failed

    Quote Originally Posted by Richard Buttrey View Post
    Try starting with

    Dim s As Object
    Set s = CreateObject("SAPI.SpVoice")
    Then in the With block

    s.Speak "You are not allowed to do that"

    Hi Richard
    Thanks for suggestion

    If i may ask you a question it runs fine on my one pc but other pc Im getting this error -any reason that might cause that as I find this very weird

    p.S Your method did work -Thanks +++Rep
    Last edited by ricklou; 04-05-2019 at 04:40 PM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Method speak of object speech failed

    What's the other PC and is it running the same Windows OS and Excel version?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Method range of object failed - Please help
    By Whitethorn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2018, 09:45 AM
  2. [SOLVED] speech speak with message box and a reminder every 2 minutes
    By John Vieren in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-16-2018, 03:43 PM
  3. Speak - Speech - Speak numbers individually
    By BDD2015 in forum Excel General
    Replies: 8
    Last Post: 03-23-2017, 08:32 PM
  4. Replies: 1
    Last Post: 03-16-2016, 11:09 AM
  5. [SOLVED] How to make XL.Speech.Speak talk in a male voice
    By DPWM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2013, 04:43 PM
  6. [SOLVED] Method range of object failed
    By Aland2929 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-02-2013, 06:55 AM
  7. Speech Object and Speak Method
    By DanBlum in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2011, 10:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1