Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

to create  telnet object and open connection

Posted on 2000-02-25
3
180 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

808 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