scottsh: I tend to have an edit control object called debugbox on the desktop and a sub like this:
sub debugadd(texttoadd,clear)
if clear=true then
control.text=""
else
control.Text = Control.text & Vbcrlf & texttoadd
end if
end sub
then in any object I use something like:
DesktopX.ScriptObject("debugbox").debugadd("val1 = " & val1,False)
if val1 = 3 then
' do something
else
' do something else
end if
which would put :
val1 = 3
in the edit control
Remember to set the edit control to multiline first though or it'll be a mess
This method is a lot less problematic than msgboxes and you can look at the results of a long loop and even copy text from the edit control and plonk it in notepad and compare what you got to what you expected.
[Message Edited]