View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lee Ann[_2_] Lee Ann[_2_] is offline
external usenet poster
 
Posts: 16
Default Spell Check in Text Boxes

Thank you for being so patient - that worked!!

Just another question if it's a quick solution - the document I am using
this on is for evaluating personnel. They are evaluated on a daily basis and
4 forms (workbook pages) are being completed each day for a period of 14
days. The second tab is the only one where the evaluator is writing in the
ActiveX text boxes. There are 10 pages to that document - 2 text boxes per
page (total of 20 text boxes for each tab). This code has it checking all of
the text boxes - is there any simple way to tell it to stop when it sees no
more text? The evaluators usually don't use any more than 4 pages (8 text
boxes total) when they fill this form in.

Again, if it's not simple, don't worry about it - what you've done already
will make alot of people happy.

Thanks so much.

"jamescox" wrote:


You've got line wrap problems.

The line in my note that reads

MsgBox "Spelling for this ActiveX control has been checked."

has been broken by whatever technique you used to get the subroutine
code into the VBA editor to this:

MsgBox "Spelling for this ActiveX control has been
checked."

where there is a carriage return behind the 'n' in 'been'. Excel saw
that there was a line where a string had been started with a double
quote, but there was no closing quote, so it added one - giving what you
saw, ie

MsgBox "Spelling for this ActiveX control has been"
checked."

However, then it now found on a new line

checked"

at which point, it threw up it's hands, turned the text red (to
indicate it had found a problem) and wouldn't run the sub.

So, just make sure the long lines look like they are in my post and you
should be OK.

(The yellow highlight marks the place in the code where execution
stopped - in this case since it found bad code in the subroutine, it
stopped at the first line of the sub)

Copying the code from the grey box, pasting it into WordPad (not
NotePad) or Word, then recopying it from there and pasting it into the
VBA editor generally will take care of line wrap problems...


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=120599