Solved

to create  telnet object and open connection

Posted on 2000-02-25
3
174 Views
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
0
Comment
Question by:mativare
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
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
        DoEvents
    Loop
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!


Cheers!
0
 
LVL 1

Author Comment

by:mativare
ID: 2559778
Impressive!
0
 
LVL 14

Expert Comment

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


Cheers!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

757 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

19 Experts available now in Live!

Get 1:1 Help Now