Hi, David.
I take it from your message that there is no way to get my error handler to
highlight the offending line...
The VB Editor isn't intended to be manipulated from VBA code with such fine
detail as you'd like to use. The VB code which highlights the source code
(as in "execution point text") is:
RunCommand acCmdShowNextStatement
However, if you try using this command in your VBA code in the current
project, you'll receive a run-time error that the command isn't available at
this time. The only other way I know of to highlight text in the code module
is to use a selection text method, but it doesn't work the same as the
execution point text that you expect to see when using the debugger in break
mode. You could use the following code example after setting a reference to
the VBIDE library:
Application.VBE.ActiveCodePane.SetSelection 100, 5, 100, 30
The caveat is that your code needs logic to determine which numbers to feed
this method for the starting/ending lines and columns. It's not very useful
in your situation, unless you want your code to keep track of line numbers.
The default path and file name for this library is:
C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail harvesters
for spammers are (e-mail address removed) and (e-mail address removed)
- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.