Visual Basic 6 - Print Text Box Value

vb6 Taiwan
  • 12 years ago

     Hi,

    Im trying to print 2 values which is the cation of a label and the text from a text box so it prints out like this:

    First Name: Jack Crack

     
    First Name = Label1.Caption

    Jack Crack = Text1.Text
     

    I tried this but it doesnt work and need some help please:

    Private Sub Command1_Click()
    Printer.Print "Label1.Caption"; "Text1.Text"
    Printer.Print ""
    Printer.Print "--------------------------------------------"
    Printer.Print "Order History"
    Printer.EndDoc
    End Sub
     

    Any Help please? 

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.”