Hello all,
I have a Visual Basic script in a spreadsheet that allows me to double-click a cell, and open a telnet session to a particular IP address. As seen below:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("A4")) Is Nothing Then
Cancel = True
t = Shell("c:\windows\syswow64\telnet.exe 192.168.1.1 " & A4, vbNormalFocus)
End If
If Not Intersect(Target, Range("A9")) Is Nothing Then
Cancel = True
t = Shell("c:\windows\syswow64\telnet.exe 192.168.1.2 " & A9, vbNormalFocus)
End If
If Not Intersect(Target, Range("A14")) Is Nothing Then
Cancel = True
t = Shell("c:\windows\syswow64\telnet.exe 192.168.1.3 " & A14, vbNormalFocus)
End If
My goal is to have the script perform a series of keystrokes; so I can get past the banner, username and password prompts, and into the Command Line of a switch.
The order of these keystrokes are as follows:
CTRL+Y (Proceed past banner page)
username (the username of the switch)
Enter (to input the username and proceed to password field)
password (the password of the switch)
Enter (to input the password and proceed to the command line interface)
If anyone could help me with this, it would be greatly appreciated!
Thanks
Bookmarks