Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Spell Check in Text Boxes


Not a difficult addition. Just below the line

Dim rText As Range

*add* these lines:

Dim sMsg As String
Dim lResponse As Long

sMsg = "Spelling for this box has been checked." & vbLf & vbLf
sMsg = sMsg & "Click OK to continue or Cancel to end spell checking."

Then, *replace* the line

MsgBox "Spelling for this ActiveX control has been checked."

with these lines:

lResponse = MsgBox(sMsg, vbOKCancel)

If lResponse = vbCancel Then
Exit Sub
End If

That ought to get you there. You can change the text in sMsg to
whatever would make the most sense to your users.

James


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120599

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Spell Check in Text Boxes

This worked, but it was a little unpredictable in the path it chose when
checking the boxes. I'm just going to stick with the original code.

Thanks again for all your assistance!

"jamescox" wrote:


Not a difficult addition. Just below the line

Dim rText As Range

*add* these lines:

Dim sMsg As String
Dim lResponse As Long

sMsg = "Spelling for this box has been checked." & vbLf & vbLf
sMsg = sMsg & "Click OK to continue or Cancel to end spell checking."

Then, *replace* the line

MsgBox "Spelling for this ActiveX control has been checked."

with these lines:

lResponse = MsgBox(sMsg, vbOKCancel)

If lResponse = vbCancel Then
Exit Sub
End If

That ought to get you there. You can change the text in sMsg to
whatever would make the most sense to your users.

James


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120599


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Spell Check in Text Boxes


One of the most important thing in working with spreadsheets is knowing
when to quit! Having said that, if you change the line in the 'original
code' from

If Err = 0 Then

to

If Err = 0 And Len(rText.Cells(1).Value) < 0 Then

your users won't see the code stop for empty textboxes and therefore
they won't have to click OK in for those textboxes.

Now I'm going to put down the keyboard and back slowly away - and maybe
I won't compulsively make any more 'enhancements'... :Bgr


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120599

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Spell Check in Text Boxes

Well, now that you brought that up, I had to try it. I like this one and I
thank you. I suspect always trying to "enhance" makes people such as
yourselves as knowledgeable as you are.

Thanks again!



"jamescox" wrote:


One of the most important thing in working with spreadsheets is knowing
when to quit! Having said that, if you change the line in the 'original
code' from

If Err = 0 Then

to

If Err = 0 And Len(rText.Cells(1).Value) < 0 Then

your users won't see the code stop for empty textboxes and therefore
they won't have to click OK in for those textboxes.

Now I'm going to put down the keyboard and back slowly away - and maybe
I won't compulsively make any more 'enhancements'... :Bgr


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120599


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
Text Boxes and Check Marks LinZ Excel Discussion (Misc queries) 1 December 18th 08 10:30 PM
Spell Check Sarapu New Users to Excel 1 October 16th 07 07:39 AM
Using Spell Check function in text box when worksheet is protected Paul Excel Discussion (Misc queries) 0 February 8th 07 04:29 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
Strange behavior w/ Text, Button, & Check Boxes kswinth Excel Discussion (Misc queries) 0 June 26th 05 04:49 PM


All times are GMT +1. The time now is 06:36 PM.

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"