Debugging F8/ tracing

  • Thread starter Thread starter Sheela
  • Start date Start date
S

Sheela

Hi,

How do you actually debug in VBA. How do I check where
the error is exactly and what's causing the problem in
the coding?

I also want to know what's the difference between
Textbox1.Text, Textbox1.Value and Val(Textbox1.Text)?

Thanks & Regards,
Sheela
 
In addition to stepping through code one line at a time
with F8, you can use watches, debug.print, test variables,
break points. However, explaining how to debug VBA code
is not something that can be simply answered in a post
because there are so many different things that can cause
a problem. You would be better off posting the code that
is giving you a problem.

For a textbox, there is no real difference between text
and value. It may be a hold over from previous versions
of the control. Most objects have a value propery
(checkbox, option buttion, command button, text boxes,
etc..), but only a textbox, listbox and combobox use the
text property.

Val(Textbox1.Text) convert what is in the text into a
number. If you had say a street address, 123 Main St. for
example, the VAL would be 123.
 
Back
Top