Consulting

Results 1 to 3 of 3

Thread: Spell check stopped working

  1. #1
    VBAX Newbie
    Joined
    Apr 2018
    Posts
    4
    Location

    Spell check stopped working

    The code below is triggered by the user attempting to save and runs a spell check through an activex textbox in the document and if a condition is met, opens a msgbox to remind the user to do something. Both were working fine but today, for some reason the spell check stopped working. The msgbox portion still works. Does anyone know why the spell check would stop working? What do I need to do to get it to work again?

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Dim xObject As Object
    Dim xCell As Range
    On Error Resume Next
        Sheets("1107").Unprotect
        Set xCell = Sheets("1107").Cells(ActiveSheet.Rows.Count, ActiveSheet.Columns.Count)
    If Sheets("1107").OLEObjects.Count > 0 Then
            For Each xObject In Sheets("1107").OLEObjects
                xCell = xObject.Object.Text
                xCell.CheckSpelling , , , 1033
                xObject.Object.Text = xCell
            Next
        End If
    If Sheets("1107").Range("c7") = "1.3.13" Then
        MsgBox "Incident report requires UoF Review"
        End If
    End Sub

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Moderator Bump
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    Comment out the On Error Resume Next and see what fails
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

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