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

how can i spell check a textbox on a userform in an Excel macro.

TextBox1.CheckSpelling "CUSTOM.DIC", False, True, 1033

does not work

and this form

A = Application.CheckSpelling(cWords, CustomDictionary:="CUSTOM.DIC",
IgnoreUppercase:=False)

just tells me if the word id good or not.



Ray


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default textbox spell check

On May 7, 8:13 pm, "Ray" wrote:
how can i spell check a textbox on a userform in an Excel macro.

TextBox1.CheckSpelling "CUSTOM.DIC", False, True, 1033

does not work

and this form

A = Application.CheckSpelling(cWords, CustomDictionary:="CUSTOM.DIC",
IgnoreUppercase:=False)

just tells me if the word id good or not.

Ray


Try this...

Inside of your spell check button on the userform...

Sheets("Sheet1").Range("A1").Value = TextBox1.Value
Sheets("Sheet1").Range("A1").Select
Application.CheckSpelling
TextBox1.Value = Sheets("Sheet1").Range("A1").Value

It's worked for me in the past...hope it works for you =)

~Shaka

  #3   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default textbox spell check

A good idea, but using Application.Checkspelling throws an error when I try
it. According to help, application is used when you want to test a word, and
thus the word argument would be required. I think you need to specify the
range:

With Sheets("Sheet1").Range("A1")
.Value = TextBox1.Value
.CheckSpelling
TextBox1.Value = .Value
End With

" wrote:

On May 7, 8:13 pm, "Ray" wrote:
how can i spell check a textbox on a userform in an Excel macro.

TextBox1.CheckSpelling "CUSTOM.DIC", False, True, 1033

does not work

and this form

A = Application.CheckSpelling(cWords, CustomDictionary:="CUSTOM.DIC",
IgnoreUppercase:=False)

just tells me if the word id good or not.

Ray


Try this...

Inside of your spell check button on the userform...

Sheets("Sheet1").Range("A1").Value = TextBox1.Value
Sheets("Sheet1").Range("A1").Select
Application.CheckSpelling
TextBox1.Value = Sheets("Sheet1").Range("A1").Value

It's worked for me in the past...hope it works for you =)

~Shaka


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default textbox spell check

well here is what i was trying.

i have and excel macro(program).
it can send "Can Emails" to anyone in a list with the selection of their
name on a spread sheet,
and the click of a command button. these emails can be a combo HTML and
plane text.
using DHTMLEdit to split the HTML and text apart so CDO can send it.
all that works good.

the program also uses another userform with DHTMLEdit one it.
i use this to name up new email messages.
in the DHTMLEdit i want to add spell check, much like outlook express does
on send.
sounds easy, outlook express does it, Excel can Spell Check, and i don't
want to load Word for it.
problem is, DHTMLEdit does not support spell check, or i have not found it
yet.
so i can get the DOM.interHTML and go thru it to find each word.
two problems come from that.
i can't show in the DHTMLEdit screen where the bad word it,
and i can replace it without changing the source and re-inputting it back
into DHTMLEdit

and right now, the putting each word into a cell on a spread sheet(remember
i am on a user form) to test this
and looking back at the cell to see the word was changed takes to long.


--
Ray


"JMB" wrote in message
...
A good idea, but using Application.Checkspelling throws an error when I

try
it. According to help, application is used when you want to test a word,

and
thus the word argument would be required. I think you need to specify the
range:

With Sheets("Sheet1").Range("A1")
.Value = TextBox1.Value
.CheckSpelling
TextBox1.Value = .Value
End With

" wrote:

On May 7, 8:13 pm, "Ray" wrote:
how can i spell check a textbox on a userform in an Excel macro.

TextBox1.CheckSpelling "CUSTOM.DIC", False, True, 1033

does not work

and this form

A = Application.CheckSpelling(cWords, CustomDictionary:="CUSTOM.DIC",
IgnoreUppercase:=False)

just tells me if the word id good or not.

Ray


Try this...

Inside of your spell check button on the userform...

Sheets("Sheet1").Range("A1").Value = TextBox1.Value
Sheets("Sheet1").Range("A1").Select
Application.CheckSpelling
TextBox1.Value = Sheets("Sheet1").Range("A1").Value

It's worked for me in the past...hope it works for you =)

~Shaka




  #5   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default textbox spell check

My interpretation of Shaka's suggestion is to dump the entire text from the
textbox into an empty cell, spell check that cell, then bring the entire text
from the cell back into the textbox - not to transfer/spell check your text
one word at a time. On my machine (XL2000) it appears a single cell can hold
32,767 characters - I would think that s/b enough for whatever text you may
have in a userform textbox.

Based on VBA help, CheckSpelling applies to Application (a single word), a
worksheet, range, or chart object. It doesn't look like this method can be
used directly on a texbox in a userform (but I've never explored this much
before tonight).


"Ray" wrote:

well here is what i was trying.

i have and excel macro(program).
it can send "Can Emails" to anyone in a list with the selection of their
name on a spread sheet,
and the click of a command button. these emails can be a combo HTML and
plane text.
using DHTMLEdit to split the HTML and text apart so CDO can send it.
all that works good.

the program also uses another userform with DHTMLEdit one it.
i use this to name up new email messages.
in the DHTMLEdit i want to add spell check, much like outlook express does
on send.
sounds easy, outlook express does it, Excel can Spell Check, and i don't
want to load Word for it.
problem is, DHTMLEdit does not support spell check, or i have not found it
yet.
so i can get the DOM.interHTML and go thru it to find each word.
two problems come from that.
i can't show in the DHTMLEdit screen where the bad word it,
and i can replace it without changing the source and re-inputting it back
into DHTMLEdit

and right now, the putting each word into a cell on a spread sheet(remember
i am on a user form) to test this
and looking back at the cell to see the word was changed takes to long.


--
Ray


"JMB" wrote in message
...
A good idea, but using Application.Checkspelling throws an error when I

try
it. According to help, application is used when you want to test a word,

and
thus the word argument would be required. I think you need to specify the
range:

With Sheets("Sheet1").Range("A1")
.Value = TextBox1.Value
.CheckSpelling
TextBox1.Value = .Value
End With

" wrote:

On May 7, 8:13 pm, "Ray" wrote:
how can i spell check a textbox on a userform in an Excel macro.

TextBox1.CheckSpelling "CUSTOM.DIC", False, True, 1033

does not work

and this form

A = Application.CheckSpelling(cWords, CustomDictionary:="CUSTOM.DIC",
IgnoreUppercase:=False)

just tells me if the word id good or not.

Ray

Try this...

Inside of your spell check button on the userform...

Sheets("Sheet1").Range("A1").Value = TextBox1.Value
Sheets("Sheet1").Range("A1").Select
Application.CheckSpelling
TextBox1.Value = Sheets("Sheet1").Range("A1").Value

It's worked for me in the past...hope it works for you =)

~Shaka







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default textbox spell check

I'll try that,
only problem is.
my text stream has HTML in it.
my little sub skip's over the HTML tags and gives me a word at a time.

I guess,
this is why it's called VBA and not VB.
we are working with a limited subset.
and in office 2000 it was not thought to be important.

thanks

Ray


"JMB" wrote in message
...
My interpretation of Shaka's suggestion is to dump the entire text from

the
textbox into an empty cell, spell check that cell, then bring the entire

text
from the cell back into the textbox - not to transfer/spell check your

text
one word at a time. On my machine (XL2000) it appears a single cell can

hold
32,767 characters - I would think that s/b enough for whatever text you

may
have in a userform textbox.

Based on VBA help, CheckSpelling applies to Application (a single word), a
worksheet, range, or chart object. It doesn't look like this method can

be
used directly on a texbox in a userform (but I've never explored this much
before tonight).


"Ray" wrote:

well here is what i was trying.

i have and excel macro(program).
it can send "Can Emails" to anyone in a list with the selection of their
name on a spread sheet,
and the click of a command button. these emails can be a combo HTML and
plane text.
using DHTMLEdit to split the HTML and text apart so CDO can send it.
all that works good.

the program also uses another userform with DHTMLEdit one it.
i use this to name up new email messages.
in the DHTMLEdit i want to add spell check, much like outlook express

does
on send.
sounds easy, outlook express does it, Excel can Spell Check, and i don't
want to load Word for it.
problem is, DHTMLEdit does not support spell check, or i have not found

it
yet.
so i can get the DOM.interHTML and go thru it to find each word.
two problems come from that.
i can't show in the DHTMLEdit screen where the bad word it,
and i can replace it without changing the source and re-inputting it

back
into DHTMLEdit

and right now, the putting each word into a cell on a spread

sheet(remember
i am on a user form) to test this
and looking back at the cell to see the word was changed takes to long.


--
Ray


"JMB" wrote in message
...
A good idea, but using Application.Checkspelling throws an error when

I
try
it. According to help, application is used when you want to test a

word,
and
thus the word argument would be required. I think you need to specify

the
range:

With Sheets("Sheet1").Range("A1")
.Value = TextBox1.Value
.CheckSpelling
TextBox1.Value = .Value
End With

" wrote:

On May 7, 8:13 pm, "Ray" wrote:
how can i spell check a textbox on a userform in an Excel macro.

TextBox1.CheckSpelling "CUSTOM.DIC", False, True, 1033

does not work

and this form

A = Application.CheckSpelling(cWords,

CustomDictionary:="CUSTOM.DIC",
IgnoreUppercase:=False)

just tells me if the word id good or not.

Ray

Try this...

Inside of your spell check button on the userform...

Sheets("Sheet1").Range("A1").Value = TextBox1.Value
Sheets("Sheet1").Range("A1").Select
Application.CheckSpelling
TextBox1.Value = Sheets("Sheet1").Range("A1").Value

It's worked for me in the past...hope it works for you =)

~Shaka







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 Check Sarapu New Users to Excel 1 October 16th 07 07:39 AM
... Can I set Spell Check to automatically check my spelling ... Dr. Darrell Setting up and Configuration of Excel 0 March 21st 06 08:26 PM
Spell Check Karen Excel Discussion (Misc queries) 1 June 30th 05 07:10 PM
Spell Check Hans Emilio Excel Programming 3 June 12th 05 09:56 PM
spell check a textbox KimberlyC Excel Programming 1 January 14th 04 07:30 PM


All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"