Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spell Checking with checking cell notes | Excel Discussion (Misc queries) | |||
Spell checking without the POP up ... | Excel Programming | |||
Spell Checking a String | Excel Programming | |||
Spell Checking a text box. | Excel Programming |