CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: COM1

  1. #1
    Join Date
    Jan 2000
    Posts
    14

    COM1

    Hi,

    Why does'nt the the codes below work? It compiled and accepted input phone number..

    A modem (with Tone Dial) was connected to COM1 but did not dial out??



    Option explicit
    Dim pNumber As String

    Private Sub Form_Load()
    pNumber = Inputbox("Number to dial:")
    Open "COM1" For Output As 1
    Print 1, "ATDT" & pNumber & Chr$(13)
    Close 1
    End sub



  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: COM1

    The thing that happend here is that you have written the text to a file, not to the modem. If you have added a comm object, set the commport property to 1, and use the portopen statement to open it.

    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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

Featured