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

On 6/21, CWillis asked about spell checking. NickHK said he should use the
syntax 2 but no explanation of how to do so. I have a situation where I have
a column of data, one word per cell, that I would like to do a spell check
on. If the word is good, save it to a different cell and increment for the
next entry. If the word is spelled incorrectly don't give me the goofy box,
just look at the next word. My biggest problem is that I don't understand
Application objects and stuff like that. I read the help boxes but with no
formal programming experience I can't understand it. I am able to write the
loop using the Cells property. Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default CheckSpelling

Sub SpelWordCorect()
On Error GoTo SomethingsBroke
Dim x As Boolean
Dim rng As Excel.Range
Dim rngCell As Excel.Range
Set rng = Selection
For Each rngCell In rng
If Len(rngCell) Then
x = Application.CheckSpelling(rngCell.Value)
rngCell(1, 2).Value = x
End If
Next
SomethingsBroke:
Exit Sub
Beep
MsgBox Err.Number & " " & Err.Description
Resume Next
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Jim McC"

wrote in message
On 6/21, CWillis asked about spell checking. NickHK said he should use the
syntax 2 but no explanation of how to do so. I have a situation where I have
a column of data, one word per cell, that I would like to do a spell check
on. If the word is good, save it to a different cell and increment for the
next entry. If the word is spelled incorrectly don't give me the goofy box,
just look at the next word. My biggest problem is that I don't understand
Application objects and stuff like that. I read the help boxes but with no
formal programming experience I can't understand it. I am able to write the
loop using the Cells property. Thanks for any help.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default CheckSpelling

Hi Jim McC,

Give this a go in the worksheet VB editor. Assumes the word list in column
A and column B is available.

Sub Check_Spelling()
On Error Resume Next
Dim R As Long
[A1].Select

For R = 1 To [A1].CurrentRegion.Rows.Count
If Application.CheckSpelling( _
Word:=Cells(R, 1).Value, _
IgnoreUppercase:=False) = True _
Then Cells(R, 2).Value = "*"
Next R

[A1].Sort _
Key1:=Range("B1"), _
Key2:=Range("A1"), _
Header:=xlNo

MsgBox "The correctly spelled words in" _
& vbCrLf & "Column A have an * in Column B"

End Sub

HTH
Regards,
Howard

"Jim McC" wrote in message
...
On 6/21, CWillis asked about spell checking. NickHK said he should use the
syntax 2 but no explanation of how to do so. I have a situation where I
have
a column of data, one word per cell, that I would like to do a spell check
on. If the word is good, save it to a different cell and increment for the
next entry. If the word is spelled incorrectly don't give me the goofy
box,
just look at the next word. My biggest problem is that I don't understand
Application objects and stuff like that. I read the help boxes but with no
formal programming experience I can't understand it. I am able to write
the
loop using the Cells property. Thanks for any help.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default CheckSpelling

Correction...

Change the order of these two lines...
SomethingsBroke:
Exit Sub
-To-
Exit Sub
SomethingsBroke:

Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html
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
CheckSpelling a Textbox Stuart[_21_] Excel Programming 5 March 19th 05 06:40 AM
CheckSpelling Method Continues beyond specified range greggmendel Excel Programming 1 October 22nd 04 01:50 AM
CheckSpelling + TextBox Stuart[_5_] Excel Programming 0 July 27th 04 06:59 AM
TextBox - CheckSpelling question Stuart[_5_] Excel Programming 2 July 24th 04 08:41 PM
Application.CheckSpelling Error in Macro Bjorg P. Excel Programming 1 April 30th 04 10:30 PM


All times are GMT +1. The time now is 05:33 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"