Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default spell check a textbox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default spell check a textbox

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spell Check Warm Excel Worksheet Functions 3 June 16th 09 03:30 PM
Spell Check Claudia Excel Discussion (Misc queries) 4 May 13th 09 08:11 PM
Spell Check Mishka Excel Worksheet Functions 1 March 1st 07 08:51 PM
Spell check sri Excel Discussion (Misc queries) 1 February 6th 07 09:36 PM
... Can I set Spell Check to automatically check my spelling ... Dr. Darrell Setting up and Configuration of Excel 0 March 21st 06 08:26 PM


All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"