Norma Posy
asked on
Spell Check in VB6
I need to spell check a VB6 text box. I asked this question here. Was directed to:
https://www.experts-exchange.com/articles/8678/Spell-check-a-VBA-or-VB6-ActiveX-textbox.html
Or:
http://tinyurl.com/ha7heas
I wrote a little test app. Just a text box and a command button. Compiled to an exe. The spell check exe works fine in XP. In Win7, nothing happens. No error. Nothing.
I can't debug in Win7 obviously.
Would it be convenient if I copied the source code from the above link here?
https://www.experts-exchange.com/articles/8678/Spell-check-a-VBA-or-VB6-ActiveX-textbox.html
Or:
http://tinyurl.com/ha7heas
I wrote a little test app. Just a text box and a command button. Compiled to an exe. The spell check exe works fine in XP. In Win7, nothing happens. No error. Nothing.
I can't debug in Win7 obviously.
Would it be convenient if I copied the source code from the above link here?
The best way here is talk to the author.
Sorry but since I still use XP I won't be able to help find out what's wrong when run in Win 7. You may however find techniques in this article of mine on debugging that will help find the problem.
ASKER
Martin: VB6 won't run under Win7. At least that is what I have been told. Never tried it. (That's a lot of CDs to load just to find out.) There's a technique I have used to get around this. Back in XP, Define an error integer iErr. Sprinkle "Err = 1" (2, 3, 4, etc) throughout the code. Just before exiting, display a MsgBox showing iErr. At least that will tell me how far the thing got.
Thing is, under Win7 it doesn't throw up any errors. It just doesn't do anything.
The code invokes Word's spell checker. It first determines the resident version of Word. I am thinking that the "Cases" in the code don't include versions past when the code was created. I will look at that. There should be an "Else" I can use to tell me "Word not found". Or something like that.
Thing is, under Win7 it doesn't throw up any errors. It just doesn't do anything.
The code invokes Word's spell checker. It first determines the resident version of Word. I am thinking that the "Cases" in the code don't include versions past when the code was created. I will look at that. There should be an "Else" I can use to tell me "Word not found". Or something like that.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Martin: I develop and compile on an XP machine. The exe runs fine there. On a Win7 machine, when I run the exe, nothing at all happens. No message box, no error report, nothing.
Yes, I think my version of Word is not included in those lines of code. But I don't get that message box under line 9 either. I will have to investigate and get back here.
Yes, I think my version of Word is not included in those lines of code. But I don't get that message box under line 9 either. I will have to investigate and get back here.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you have not already, you should changeOMG, I never, and no one else as far as I know, has ever noticed that mistake!! I will update my article now. Thank you.
Case "Else"
to
Case Else
dontcha hate bugs like that, Martin... when you notice them and think, "how the heck have I not noticed that before????" :D
I know. In my case I can chalk it up to a "senior moment" but the article was first published 5 years ago and it has gotten lots of views and likes since then and nobody has said a word.
ASKER
My version of word is "15.0". Had to add it to the case statement.
How many times have I stared buggy eyed at code not seeing the screw up. Then you call another set of eyeballs over and "pop" - there it is. "Else" indeed!!
Thank you to everyone.
How many times have I stared buggy eyed at code not seeing the screw up. Then you call another set of eyeballs over and "pop" - there it is. "Else" indeed!!
Thank you to everyone.
You're welcome and I'm glad I was able to help.
If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.
Marty - Microsoft MVP 2009 to 2016
Experts Exchange MVE 2015
Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.
Marty - Microsoft MVP 2009 to 2016
Experts Exchange MVE 2015
Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
I'm glad my eyeballs could be of assistance 8-)