Results 1 to 4 of 4

Thread: Problem with Open command on printer port

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2025
    Posts
    2

    Problem with Open command on printer port

    I am using the Open command perfectly to open the virtual port of a printer (USB) as follows:

    Open "\\vmxp\generic" For Output As #1

    Now I intend to ask the user for the path of the virtual printer, but I receive the message "Path not found" when I try to use it as a parameter in the command line as follows:

    Open "'\" & txtportname.Text & "'" For Output As #1

    The syntax with parameters should certainly not be like this, so I would like to know what is the correct way to use the Open command?

    Thank you all for your support and I look forward to hearing from you.

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,476

    Re: Problem with Open command on printer port

    Why do you have “‘\” at the beginning of the command?

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2025
    Posts
    2

    Re: Problem with Open command on printer port

    Quote Originally Posted by Arnoutdv View Post
    Why do you have “‘\” at the beginning of the command?
    I am sorry!

    I'm typing the following syntax in the code below, but with error!

    txtnomeporta.Text = "\\vmxp\generic"

    Open "''" & txtnomeporta.Text & "'" For Output As #1

  4. #4
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,476

    Re: Problem with Open command on printer port

    Why enclose the text between “ in the Open command??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width