469,126 Members | 1,326 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,126 developers. It's quick & easy.

Print on Form

Hi all, I have a very small problem that i want to print on form, I wrote code under commandbutton1:
Dim MyVar
MyVar = "Hello."
Debug.Print MyVar

but it doesnt work? could u pls tell my how i can just put a line on form on left top corner? Thx a lot
Jan 4 '08 #1
4 1067
8,127 Expert 4TB
just use

Print myvar
Jan 4 '08 #2
just use

Print myvar

Hi, I used this but its say " Object doesnt support this property or method
Jan 4 '08 #3
8,127 Expert 4TB
are you using vb 6.0 ?
Jan 4 '08 #4
8,435 Expert 8TB
You have to use the appropriate method (in VB6, generally the Print method) of a particular object. For example to print on Form1, you would use Form1.Print or to print on the actual printer, use Printer.Print.

When you use Debug.Print, it prints to the "immediate window". That is the window where VB shows any debugging info. This is only available in the IDE, not at runtime.
Jan 4 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Paul Mendez | last post: by
5 posts views Thread by Darren DeCoste | last post: by
3 posts views Thread by sea | last post: by
2 posts views Thread by Rodo | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.