Connecting Tech Pros Worldwide Forums | Help | Site Map

Debugging in VBA - 3) General Tips

NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,714
#1   May 20 '07
Table of Contents - [Debugging in VBA]
Previous Chapter - [Debugging in VBA - 2G) The Watch Pane]
-----------------------------------------------------------------------------------------------
3) General Tips.

The first and most important tip is that when you are developing anything, remember to USE the debugging facilities.

Most of the facilities are only available when the code is running (although paused). While it is possible to start individual (parameterless) procedures from within the VBA editor, the usual way to get control is to put a breakpoint in the code where you want to start tracing from (See Debugging in VBA - 2A) The Code Pane (F7)) and then simply start the project in the normal way (From the Access window).

Other miscellaneous tips:
  • Find out precisely where the problem occurs.
  • Display information (current contents of variables or controls etc) at various stages of the process.
  • Often overlooked - check with the Help system to make sure your use of the inbuilt functions; methods; etc is correct.



Reply