Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Spell Checking

Excel 2003

I want to add a button to allow the user to check their spelling on a popup
form text boxes.

can some one help with the code please?

Any help here will be appreciated.

Thanks in advance
dave

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Spell Checking

Hi Dave

I'm not sure if anyone else here can point you in the right direction
for checking spelling directly on the form but the code below works by
putting the textbox value in a cell and then check the cell checking
the spelling and then replacing the textbox with the value from the
cell.

Option Explicit

Option Explicit

Private Sub CommandButton1_Click()

With Sheets(1)

.Cells(1, 1).Value = TextBox1.Value

.Cells(1, 1).CheckSpelling SpellLang:=2057

TextBox1.Value = .Cells(1, 1).Value

.Cells(1, 1).Value = ""

End With

End Sub

Hope this helps

Steve
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Spell Checking

Not sure I understand Steve.
This code give "On the fly" spell checking (Like in Word)
Or
Fixes ONLY what is in the cell (which in turn fix what is on the for - I
think)

Can I get a few more details on how this works?

Thanks

dave

"Incidental" wrote in message
...
Hi Dave

I'm not sure if anyone else here can point you in the right direction
for checking spelling directly on the form but the code below works by
putting the textbox value in a cell and then check the cell checking
the spelling and then replacing the textbox with the value from the
cell.

Option Explicit

Option Explicit

Private Sub CommandButton1_Click()

With Sheets(1)

.Cells(1, 1).Value = TextBox1.Value

.Cells(1, 1).CheckSpelling SpellLang:=2057

TextBox1.Value = .Cells(1, 1).Value

.Cells(1, 1).Value = ""

End With

End Sub

Hope this helps

Steve


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Spell Checking

Hi Dave

Sorry if i wasn't very clear with my last post. This code will not
spell check on the fly like word that would be a whole different ball
game with loads more code and head aches, it will only take the value
of the textbox put it into a cell and then check the spelling of the
value you put in the cell. Then will check the spelling of the text
in the cell and when all changes have been made it will replace the
text in the textbox with the corrected text from the cell. Lastly it
will clear the cell again just to clean up a bit. I have commented
each line of code on the line directly below it but to see better how
it works create a form with a textbox and a button on it (both with
default names) paste the code below into the forms code module and
then run the form and try typing things in the textbox then press the
button to spell check.

Option Explicit

Private Sub CommandButton1_Click()

With Sheets(1)
'tell excel which sheet you want to work with

..Cells(1, 1).Value = TextBox1.Value
'get the value from the textbox and put it in to a cell on the sheet

..Cells(1, 1).CheckSpelling SpellLang:=2057
'check the cell to see if it is spelt correctly

TextBox1.Value = .Cells(1, 1).Value
'if any word is spelt wrong the spell checking window will pop up
'just like any of the office apps

..Cells(1, 1).Value = ""
'clean up

End With
'close the with statement

End Sub

Hope this is a little clearer for you

Steve

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Spell Checking

Thanks Steve,
I will give that a try

dave

"Incidental" wrote in message
...
Hi Dave

Sorry if i wasn't very clear with my last post. This code will not
spell check on the fly like word that would be a whole different ball
game with loads more code and head aches, it will only take the value
of the textbox put it into a cell and then check the spelling of the
value you put in the cell. Then will check the spelling of the text
in the cell and when all changes have been made it will replace the
text in the textbox with the corrected text from the cell. Lastly it
will clear the cell again just to clean up a bit. I have commented
each line of code on the line directly below it but to see better how
it works create a form with a textbox and a button on it (both with
default names) paste the code below into the forms code module and
then run the form and try typing things in the textbox then press the
button to spell check.

Option Explicit

Private Sub CommandButton1_Click()

With Sheets(1)
'tell excel which sheet you want to work with

.Cells(1, 1).Value = TextBox1.Value
'get the value from the textbox and put it in to a cell on the sheet

.Cells(1, 1).CheckSpelling SpellLang:=2057
'check the cell to see if it is spelt correctly

TextBox1.Value = .Cells(1, 1).Value
'if any word is spelt wrong the spell checking window will pop up
'just like any of the office apps

.Cells(1, 1).Value = ""
'clean up

End With
'close the with statement

End Sub

Hope this is a little clearer for you

Steve

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 Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Spell checking without the POP up ... LarryLev[_2_] Excel Programming 1 May 11th 07 05:03 AM
Spell Checking a String Robert Mulroney[_3_] Excel Programming 1 November 29th 05 02:10 PM
Spell Checking a text box. c Excel Programming 2 February 28th 05 11:45 PM


All times are GMT +1. The time now is 09:47 PM.

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"