Subject: arrays
Posted By: meghaljani Post Date: 1/9/2007 12:25:53 PM
I am a beginner and I am confused with debug.write and debug.WriteLine method. When I execute array program (page 148-149) in the chapter 4, I am not getting any output. When I replaced debug.write and debug.WriteLine with show.messagebox, I got an error that it returns no value. While replacing those methods with msgbox, program shows one digit one after another while pressing the return key every time. I have downloaded your programs for this book and when I execute them, I get the same result. Is there any way I can get the exact result that is shown in the book?

Reply By: Rod Stephens Reply Date: 1/10/2007 9:46:50 AM
The Debug.Write and Debug.WriteLine statements send output to the Immediate window. If it's not visible you can find it by opening the Debug menu, opening its Windows submenu, and selecting Immediate.

Probably the example programs are writing into the window but you don't have it visible so you're not noticing. These statements are good for displaying output without interrupting the program's flow.

MessageBox.Show displays a message in a dialog so you have to interact with it before the program can continue. It should work much like MsgBox does. If you want to include the piece of code where you do it, I can take a look at it.

Rod
RodStephens@vb-helper.com
Author of "Visual Basic 2005 Programmer's Reference"
http://www.vb-helper.com/vb_prog_ref.htm

Sign up for the free VB Helper Newsletters at http://www.vb-helper.com/newsletter.html

Go to topic 54293

Return to index page 68
Return to index page 67
Return to index page 66
Return to index page 65
Return to index page 64
Return to index page 63
Return to index page 62
Return to index page 61
Return to index page 60
Return to index page 59