ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   dictionary function (https://www.excelbanter.com/excel-programming/301466-dictionary-function.html)

Wandering Mage

dictionary function
 
is there a way to call out the excel dictionary using
dictionary functions in a macro? What is it called.
Thanks for reading!

Rob Bovey

dictionary function
 
"wandering mage" wrote in message
...
is there a way to call out the excel dictionary using
dictionary functions in a macro? What is it called.
Thanks for reading!


I'm not really sure what you're referring to. Excel doesn't have any
dictionary functions. Are you talking about the Dictionary object from the
Microsoft Scripting Runtime? If so, this doesn't have anything to do with a
dictionary in which you look up words. The Dictionary object is a container
class similar to the VBA Collection object.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *




No Name

dictionary function
 
Sorry about the lack of clarity. What I am looking to do
is take a list of words, and delete out ones that do not
register as real words in the dictionary. Yes, I think I
was refering to the dictionary object, but it sounds like
that is not what I am looking for. So, is there anyway
to do this in a macro. I want to go through all words,
and eliminate the ones that are not real words. Your
help is much appreciated, thanks for the response.
-----Original Message-----
"wandering mage"

wrote in message
...
is there a way to call out the excel dictionary using
dictionary functions in a macro? What is it called.
Thanks for reading!


I'm not really sure what you're referring to. Excel

doesn't have any
dictionary functions. Are you talking about the

Dictionary object from the
Microsoft Scripting Runtime? If so, this doesn't have

anything to do with a
dictionary in which you look up words. The Dictionary

object is a container
class similar to the VBA Collection object.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



.


Rob Bovey

dictionary function
 
The procedure below shows how you can use Excel's spelling feature to
determine if a list of words is located in the dictionary. Enter some words
and non-words into cells A1:A10 on Sheet1 and then run the procedure to see
how it works. A message box will be displayed for each word that the
spelling feature can't locate. This doesn't mean that it isn't a real word,
it just might be misspelled.

Sub LookForWordsInSpellingDictionary()
Dim bFound As Boolean
Dim rngCell As Range
Dim rngTable As Range
Set rngTable = Sheet1.Range("A1:A10")
For Each rngCell In rngTable
bFound = Application.CheckSpelling( _
Word:=rngCell.Value, IgnoreUppercase:=False)
If Not bFound Then
MsgBox rngCell.Value & " was not located."
End If
Next rngCell
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


wrote in message
...
Sorry about the lack of clarity. What I am looking to do
is take a list of words, and delete out ones that do not
register as real words in the dictionary. Yes, I think I
was refering to the dictionary object, but it sounds like
that is not what I am looking for. So, is there anyway
to do this in a macro. I want to go through all words,
and eliminate the ones that are not real words. Your
help is much appreciated, thanks for the response.
-----Original Message-----
"wandering mage"

wrote in message
...
is there a way to call out the excel dictionary using
dictionary functions in a macro? What is it called.
Thanks for reading!


I'm not really sure what you're referring to. Excel

doesn't have any
dictionary functions. Are you talking about the

Dictionary object from the
Microsoft Scripting Runtime? If so, this doesn't have

anything to do with a
dictionary in which you look up words. The Dictionary

object is a container
class similar to the VBA Collection object.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



.




Jamie Collins

dictionary function
 
wrote ...

Sorry about the lack of clarity. What I am looking to do
is take a list of words, and delete out ones that do not
register as real words in the dictionary.


If you are referring to the 'dictionary' used for spellchecking etc, I
understand that is part of the MS Word object model.

Jamie.

--

Wandering Mage

dictionary function
 
Thanks. So far, I have not tried this, but it should
work. I don't want the box to pop up though. All I will
end up doing is checking to see if it is a word then I
will delete it. Thanks for the help. More suggestions
welcomed.
-----Original Message-----
The procedure below shows how you can use Excel's

spelling feature to
determine if a list of words is located in the

dictionary. Enter some words
and non-words into cells A1:A10 on Sheet1 and then run

the procedure to see
how it works. A message box will be displayed for each

word that the
spelling feature can't locate. This doesn't mean that it

isn't a real word,
it just might be misspelled.

Sub LookForWordsInSpellingDictionary()
Dim bFound As Boolean
Dim rngCell As Range
Dim rngTable As Range
Set rngTable = Sheet1.Range("A1:A10")
For Each rngCell In rngTable
bFound = Application.CheckSpelling( _
Word:=rngCell.Value, IgnoreUppercase:=False)
If Not bFound Then
MsgBox rngCell.Value & " was not located."
End If
Next rngCell
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


wrote in message
...
Sorry about the lack of clarity. What I am looking to

do
is take a list of words, and delete out ones that do

not
register as real words in the dictionary. Yes, I

think I
was refering to the dictionary object, but it sounds

like
that is not what I am looking for. So, is there anyway
to do this in a macro. I want to go through all words,
and eliminate the ones that are not real words. Your
help is much appreciated, thanks for the response.
-----Original Message-----
"wandering mage"

wrote in message
...
is there a way to call out the excel dictionary

using
dictionary functions in a macro? What is it called.
Thanks for reading!

I'm not really sure what you're referring to.

Excel
doesn't have any
dictionary functions. Are you talking about the

Dictionary object from the
Microsoft Scripting Runtime? If so, this doesn't have

anything to do with a
dictionary in which you look up words. The Dictionary

object is a container
class similar to the VBA Collection object.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



.



.


Rob Bovey

dictionary function
 

If you don't want the message box but want to delete the word instead,
replace this:

If Not bFound Then
MsgBox rngCell.Value & " was not located."
End If

with this:

If Not bFound Then
rngCell.ClearContents
End If

If you actually want to delete the cell so that all cells below it shift up
then you will have to code the loop differently, because doing this will
throw off a For...Each type loop.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Wandering Mage" wrote in message
...
Thanks. So far, I have not tried this, but it should
work. I don't want the box to pop up though. All I will
end up doing is checking to see if it is a word then I
will delete it. Thanks for the help. More suggestions
welcomed.
-----Original Message-----
The procedure below shows how you can use Excel's

spelling feature to
determine if a list of words is located in the

dictionary. Enter some words
and non-words into cells A1:A10 on Sheet1 and then run

the procedure to see
how it works. A message box will be displayed for each

word that the
spelling feature can't locate. This doesn't mean that it

isn't a real word,
it just might be misspelled.

Sub LookForWordsInSpellingDictionary()
Dim bFound As Boolean
Dim rngCell As Range
Dim rngTable As Range
Set rngTable = Sheet1.Range("A1:A10")
For Each rngCell In rngTable
bFound = Application.CheckSpelling( _
Word:=rngCell.Value, IgnoreUppercase:=False)
If Not bFound Then
MsgBox rngCell.Value & " was not located."
End If
Next rngCell
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


wrote in message
...
Sorry about the lack of clarity. What I am looking to

do
is take a list of words, and delete out ones that do

not
register as real words in the dictionary. Yes, I

think I
was refering to the dictionary object, but it sounds

like
that is not what I am looking for. So, is there anyway
to do this in a macro. I want to go through all words,
and eliminate the ones that are not real words. Your
help is much appreciated, thanks for the response.
-----Original Message-----
"wandering mage"
wrote in message
...
is there a way to call out the excel dictionary

using
dictionary functions in a macro? What is it called.
Thanks for reading!

I'm not really sure what you're referring to.

Excel
doesn't have any
dictionary functions. Are you talking about the
Dictionary object from the
Microsoft Scripting Runtime? If so, this doesn't have
anything to do with a
dictionary in which you look up words. The Dictionary
object is a container
class similar to the VBA Collection object.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *



.



.





All times are GMT +1. The time now is 09:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com