Link to home
Start Free TrialLog in
Avatar of Andy Brown
Andy BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Spell checker for VBA

As I have been unable to find any good third party products to help me check my app for spelling mistakes, I have wrtten one myself (of sorts).  It goes through all of the reports and forms looking for Captions and ControlTip Text messages on all of the objects, which it squirts out into a table (so that I can correct it).  Pretty simple stuff - but it worked really well.

However, I really could do with something similar that allows me to go through the VBA and search for "Msgbox" and ".Caption =" text, which I will then copy that line into a field.  I'm not 100% sure how I'll send back the updates (although I do have a very ugly concept of prefixing it with a code of some sort and then overwriting it on the update) - I will have a backup :O).  But, first I need to be able to search the VBA in the forms and modules to extract the data.

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andy Brown

ASKER

Hi Jim - I'm getting a bit stuck with how to do that, you don't happen to know of any really basic examples?
Thanks Jim for the pointer - this gets me close:

https://msdn.microsoft.com/en-us/library/office/ff820960.aspx
Was just going to post that<g>

I haven't worked in this area for years, so didn't have anything handy.   That code though contains most of the elements your looking for.   There are also other properties and methods of the module object you'll want to look at, but the Lines property and Find method will be the most useful to you.

Jim.