View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Patrick C. Simonds Patrick C. Simonds is offline
external usenet poster
 
Posts: 343
Default Pasted text will not spell check

I am trying to spell check the contents of a TextBox on a UserForm.


MikeH was good enough to provide me this code last night which places the
text onto a hidden worksheet and the checks for spelling errors. The problem
is that spell checker will not find spelling error in the text pasted to the
worksheet. as a test (just to make sure the spell checker was running) I
placed a misspelled word in cell F2 and the spell checker did find that
misspelling. I removed the last line of Mike's code so that the text would
be left on the worksheet, just so I could try running the spell checker but
it still would not find the error in the text.




Sheets("Sheet2").Range("a1").Value = TextBox1.Value
Application.EnableEvents = False
Sheets("Sheet2").Range("a1").CheckSpelling
Application.EnableEvents = True
TextBox1.Text = ""
TextBox1.Text = Sheets("Sheet2").Range("a1").Value
Sheets("Sheet2").Range("a1").Value = ""