to create  telnet object and open connection

Posted on 2000-02-25
Last Modified: 2012-06-27
Is it possible to create telnet from VB using late binding and
1. open  connection to remote server, 2  pass a user id and password programmatically  and 3. make telnet  visible
Question by:mativare
  • 2
LVL 14

Accepted Solution

mcrider earned 100 total points
ID: 2559039
Here's an example using  a command1 button... Add this to a form:

Sub Sleep(Interval As Long)
    Dim lTimer As Long
    lTimer = Timer + Interval
    Do While Timer < lTimer
End Sub
Private Sub Command1_Click()
    Dim lReturn As Variant
    lReturn = Shell("Telnet hostname", vbNormalFocus) 'REPLACE hostname WITH NAME OF HOST
    AppActivate lReturn
    Sleep 1
    SendKeys "mcrider{ENTER}" 'SEND USERID
    Sleep 1
    SendKeys "noneofyourbusiness{ENTER}" 'SEND PASSWORD
End Sub

Hope this helps!


Author Comment

ID: 2559778
LVL 14

Expert Comment

ID: 2560429
Thanks for the points! Glad I could help!


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now