Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Spell Check Within a UserForm?


Can anyone help at all - even suggestions to point me in the righ
direction would be useful

Thanks
Jenni

--
jenni
-----------------------------------------------------------------------
jennie's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=26374

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Spell Check Within a UserForm?

Vic Eldridge:
ActiveX textboxes don't appear to have a spellchecking method, but the
Range object does, so I think you'll need to copy the text to a range first.
The following worked OK for me, with the code placed in Userform1's module.

Private Sub CommandButton1_Click()
Range("A1") = UserForm1.TextBox1.Text
Range("A1").CheckSpelling _
CustomDictionary:="CUSTOM.DIC", _
IgnoreUppercase:=False, _
AlwaysSuggest:=True, _
SpellLang:=3081
Range("A1").ClearContents
AppActivate ("Userform1")
End Sub


If you don't like the idea of copying the text to the worksheet first,
you can use the Application.CheckSpelling syntax to spellcheck
each word, one at a time. This technique will not display the built-in
spellcheck dialog box and it also requires that you extract each
individual word out of the textbox's text.
If your textbox contains only one word, the following would work OK.

If Application.CheckSpelling _
(UserForm1.TextBox1.Text, _
"Custom.dic", True) = False Then _
MsgBox "The word was spelled incorrectly."


The second syntax will work OK when the textbox contains multiple words.
If however, you want to identify which word was incorrectly spelled, you
will
need to run Application.CheckSpelling on each individual word.

--
Regards,
Tom Ogilvy

"jennie" wrote in message
...

Can anyone help at all - even suggestions to point me in the right
direction would be useful

Thanks
Jennie


--
jennie
------------------------------------------------------------------------
jennie's Profile:

http://www.excelforum.com/member.php...fo&userid=6706
View this thread: http://www.excelforum.com/showthread...hreadid=263748



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Spell Check Within a UserForm?

How do you get the spell check button to be active when the form is protected?

"Tom Ogilvy" wrote:

Vic Eldridge:
ActiveX textboxes don't appear to have a spellchecking method, but the
Range object does, so I think you'll need to copy the text to a range first.
The following worked OK for me, with the code placed in Userform1's module.

Private Sub CommandButton1_Click()
Range("A1") = UserForm1.TextBox1.Text
Range("A1").CheckSpelling _
CustomDictionary:="CUSTOM.DIC", _
IgnoreUppercase:=False, _
AlwaysSuggest:=True, _
SpellLang:=3081
Range("A1").ClearContents
AppActivate ("Userform1")
End Sub


If you don't like the idea of copying the text to the worksheet first,
you can use the Application.CheckSpelling syntax to spellcheck
each word, one at a time. This technique will not display the built-in
spellcheck dialog box and it also requires that you extract each
individual word out of the textbox's text.
If your textbox contains only one word, the following would work OK.

If Application.CheckSpelling _
(UserForm1.TextBox1.Text, _
"Custom.dic", True) = False Then _
MsgBox "The word was spelled incorrectly."


The second syntax will work OK when the textbox contains multiple words.
If however, you want to identify which word was incorrectly spelled, you
will
need to run Application.CheckSpelling on each individual word.

--
Regards,
Tom Ogilvy

"jennie" wrote in message
...

Can anyone help at all - even suggestions to point me in the right
direction would be useful

Thanks
Jennie


--
jennie
------------------------------------------------------------------------
jennie's Profile:

http://www.excelforum.com/member.php...fo&userid=6706
View this thread: http://www.excelforum.com/showthread...hreadid=263748




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 Sarapu New Users to Excel 1 October 16th 07 07:39 AM
Spell Check Mishka Excel Worksheet Functions 1 March 1st 07 08:51 PM
Spell check Brent Excel Discussion (Misc queries) 1 December 5th 06 10:12 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
Setup Spell Checking on Userform textboxes Charles Excel Programming 1 September 14th 04 12:58 PM


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

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

About Us

"It's about Microsoft Excel"