Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I googled this and seems like it should check AK15, which it does, but if spelling is correct it moves on to other items on the sheet. And of all things the next "item" it checks for spelling is the text on a forms button "C. Fmt."
(Fmt not in Dict... suggest FM) The Msgbox and Exit Sub are my idea of what I would like the code to do. If spelling in AK15 is correct, tell me and when I click OK it goes away. Thanks, Howard Sub SpellIt() With Range("AK15") Call .CheckSpelling("CUSTOM.DIC", False, True, 2057) 'Msgbox "Spelling is correct" ' Exit Sub End With End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Howard,
Am Sat, 8 Jun 2013 23:28:39 -0700 (PDT) schrieb Howard: Sub SpellIt() With Range("AK15") Call .CheckSpelling("CUSTOM.DIC", False, True, 2057) 'Msgbox "Spelling is correct" ' Exit Sub End With End Sub try: Sub SpellIt() Dim Ans As String Ans = Range("AK34").CheckSpelling("CUSTOM.DIC", False, True, 2057) MsgBox Ans End Sub Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Howard,
Am Sun, 9 Jun 2013 10:33:04 +0200 schrieb Claus Busch: Sub SpellIt() Dim Ans As String Ans = Range("AK34").CheckSpelling("CUSTOM.DIC", False, True, 2057) MsgBox Ans End Sub Ans is boolean and not string: Sub SpellIt() Dim Ans As Boolean Ans = Range("AK34").CheckSpelling("CUSTOM.DIC", False, True, 1031) If Ans = True Then MsgBox "Spelling correct" Else MsgBox "Spelling incorrect" End If End Sub or: Sub SpellIt2() Dim Ans As Boolean Ans = Application.CheckSpelling(Range("AK34").Text, _ "CUSTOM.DIC", False) If Ans = True Then MsgBox "Spelling correct" Else MsgBox "Spelling incorrect" End If End Sub Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi again,
Am Sun, 9 Jun 2013 11:00:17 +0200 schrieb Claus Busch: Sub SpellIt2() Dim Ans As Boolean Ans = Application.CheckSpelling(Range("AK34").Text, _ "CUSTOM.DIC", False) If Ans = True Then MsgBox "Spelling correct" Else MsgBox "Spelling incorrect" End If End Sub with Application.CheckSpelling you will get not suggestions from CUSTOM.DIC Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Claus.
I like the way the first one works, with the suggestion box, with English(UK). However, if I use this for English(US), it only returns Msgbox True regardless of correct or incorrect spelling. Ans = Range("AK34").CheckSpelling("CUSTOM.DIC", False, True, 1031) Sub SpellIt() Dim Ans As String Ans = Range("AK34").CheckSpelling("CUSTOM.DIC", False, True, 2057) 'Ans = Range("AK34").CheckSpelling("CUSTOM.DIC", False, True, 1031) MsgBox Ans End Sub Howard |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Howard,
Am Sun, 9 Jun 2013 02:36:11 -0700 (PDT) schrieb Howard: I like the way the first one works, with the suggestion box, with English(UK). However, if I use this for English(US), it only returns Msgbox True regardless of correct or incorrect spelling. sorry, I didn't change the language after testing. 1031 is German Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Howard,
Am Sun, 9 Jun 2013 02:36:11 -0700 (PDT) schrieb Howard: Sub SpellIt() Dim Ans As String Ans = Range("AK34").CheckSpelling("CUSTOM.DIC", False, True, 2057) 'Ans = Range("AK34").CheckSpelling("CUSTOM.DIC", False, True, 1031) MsgBox Ans End Sub if you check by "CUSTOM.DIC" you have to use the language of CUSTOM.DIC. If you want to check for another language (e.g. German) try: Range("AK34").CheckSpelling SpellLang:=1031 Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
consolidate data (i.e. a single cell) from multiple spreadsheets intoa single sheet | Excel Programming | |||
Spellcheck plus Locking | Excel Discussion (Misc queries) | |||
From single cell variables to a single column serie | New Users to Excel | |||
Spellcheck | Excel Discussion (Misc queries) | |||
Spellcheck via VBA in excel? | Excel Programming |