Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have a text box in my excel spreadsheet. I need to allow user to run spell check on the text they input into it. Is there a way to spell check it using code?? Thanks in advance for your help! Kimberly |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Kimberly,
Something like this may do what you're looking for: Private Sub TextBox1_LostFocus() Dim v As Variant For Each v In Split(TextBox1.Text) If Not Application.CheckSpelling(v) Then _ MsgBox "'" & v & "' is not a valid word.", _ vbExclamation Next v End Sub This code should be placed in the Worksheet class module that the TextBox is on. Just change all instances of "TextBox1" to the name of your TextBox. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] KimberlyC wrote: Hi I have a text box in my excel spreadsheet. I need to allow user to run spell check on the text they input into it. Is there a way to spell check it using code?? Thanks in advance for your help! Kimberly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Spell Check | Excel Worksheet Functions | |||
Spell Check | Excel Discussion (Misc queries) | |||
Spell Check | Excel Worksheet Functions | |||
Spell check | Excel Discussion (Misc queries) | |||
... Can I set Spell Check to automatically check my spelling ... | Setting up and Configuration of Excel |