Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Kelley Lawson   on Sep 25 In MS Office Category.

  
Question Answered By: Randy Warren   on Sep 25

Firstly, yes debug  only has Assert and Print. Considering what debug
is to be used for I think it covers all uses.

Obviously the Print will output any information you think is relevant
to trackdown bugs or odd behaviuor. You can also use the watch window.

The Debug.Assert BoolVar
BoolVar is a variable or result from a conditional test.
So you could also use either the following to go into debug mode when i=6

For i = 0 To 10
Debug.Assert i <= 5
Next i

For i = 0 To 10
Debug.Assert Not(i > 5)
Next i

A guess as to why FALSE should be used to start debug is that
variables that are not dim'd or currently have a value would cause the
debug to start. This is usually a big clue as to why things  are not
working as expected.

Use the contents tab of the vba help  to get a programmers reference
style, for properties, methods, keywords, functions.

It good to see you have an interest in debug. It's usually the last
thing new coders worry about

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Newbie needs help with VBA Greek Or get search suggestion and latest updates.


Tagged: