PDA

View Full Version : Spell check stopped working



MsAgentM
04-20-2018, 12:11 PM
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

SamT
04-23-2018, 10:23 AM
Moderator Bump

Paul_Hossler
04-23-2018, 12:21 PM
Comment out the On Error Resume Next and see what fails