Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 1st, 2004, 06:44 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default [?] Line numbers in VBA

Is there any way to display line numbers for my code in VBA for Access 2000? I'm trying to use the Erl function to make my error trapping a little less cryptic.

Reply With Quote
  #2 (permalink)  
Old November 2nd, 2004, 11:14 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Hi,

   You need to add the line numbers to the code yourself in order to use this function. Then you should be able to do something like this in your error handling:

"Line: " & Erl

   You must have a ton of code if you want to use this old function. It still works in VB.NET if you want to go to the trouble of entering these numbers yourself.


mmcdonal
Reply With Quote
  #3 (permalink)  
Old November 2nd, 2004, 12:51 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah.. I do have alot of code. I've got code behind 2 forms, and I have 8 modules. My application rips through thousands of lines in a batch of text files and parses out in-line strings, then validates them against an oracle table and generates a weblink for each in access if the strings are valid, and creates an excel spreadsheet for invalid strings, plus the business rules they break.. I get through so many files, then I get an error. Breakpoint + F8 isn't efficient if I have to go through thousands of lines in the files before I encounter a problem :( Darn VBA for not having line numbers!

Reply With Quote
  #4 (permalink)  
Old November 2nd, 2004, 02:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oxford, , United Kingdom.
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is the problem big enough that it's worth throwing money at?

There is a line numberer included in FMS Inc's Code Tools package. The downside? It costs $299 for a single user license.

http://www.fmsinc.com/products/CodeTools/index.html


Brian Skelton
Braxis Computer Services Ltd.
Reply With Quote
  #5 (permalink)  
Old November 2nd, 2004, 03:22 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I took a look at that yesterday. My company doesn't want to buy it.. Tho from my view, it would save $ in the long run if I'm not spending so much time searching for where the error takes place

Reply With Quote
  #6 (permalink)  
Old November 2nd, 2004, 05:15 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

You really don't need line numbers. Whenever there's a run-time error and you click DEBUG, the VBA window opens and the offending error is highlighted in yellow. Holding your mouse over most varibles at this point tell you their values at that stage of the run.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
  #7 (permalink)  
Old November 3rd, 2004, 07:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oxford, , United Kingdom.
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Line numbers are very useful if you're using compiled databases (mde 's or ade's) and your users are using the runtime version of Access.

Runtime Access can often generate errors that do not occur whilst using the full version and having line numbers to pinpoint errors is a life saver.

The line numbering is a minor component of FMS's Code Tools package. It's most useful features include procedure templates, error trap templates and code cleaning. I bought a copy and have never regretted the investment.


Brian Skelton
Braxis Computer Services Ltd.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Reporting With Line Numbers ef1196 Pro Visual Basic 2005 10 December 12th, 2006 03:28 PM
VBA Column Sort Order and numbers Jack1000 BOOK: Access 2003 VBA Programmer's Reference 1 October 5th, 2006 10:53 PM
I see no line numbers when viewing errors in brows kenn_rosie VB.NET 2002/2003 Basics 2 May 23rd, 2006 09:48 AM
Line Item Numbers needed Bob Hansen Access VBA 1 May 16th, 2006 02:21 PM
Generating Squentila numbers in VBA Shabir Hussain Excel VBA 1 June 27th, 2005 06:20 AM



All times are GMT -4. The time now is 12:57 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.