473,698 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VBA Telnet ?????

I am trying to find a simple example on how do telnet from VBA, but I
am not having any luck. Most of the information I am finding is out
dated or vauge at best.

Here is what I need to do,
1. Build a text file from a table.
2. FTP this file to a UNIX server.
3. Execute a UNIX command to process the file.

I have #1 and #2 working great, however I cant seem to find an easy
solution to make a telnet connection and execute 1 simple command.

Does anyone have any sample code to do this?

Thanks,
AJS

Sep 11 '06 #1
5 10081
Your description of the problem is unclear. Do you mean you can't get
the FTP to work? There's code at Randy Birch's site for that, I'm
sure. www.mvps.org/vbnet just search around. there's TONS of code
there, and I'm positive there's code for doing FTP. As for getting the
server to process the file - not a clue.

Sep 11 '06 #2
Thanks for the reply,

My problem is Telnet, How do I telnet from VBA so that I can execute a
command on a UNIX box.
AJS

pi********@hotm ail.com wrote:
Your description of the problem is unclear. Do you mean you can't get
the FTP to work? There's code at Randy Birch's site for that, I'm
sure. www.mvps.org/vbnet just search around. there's TONS of code
there, and I'm positive there's code for doing FTP. As for getting the
server to process the file - not a clue.
Sep 11 '06 #3
an*****@station 5.net wrote in
news:11******** **************@ h48g2000cwc.goo glegroups.com:
My problem is Telnet, How do I telnet from VBA so that I can
execute a command on a UNIX box.
Why not do it via executing a script via HTTP, instead?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Sep 11 '06 #4
an*****@station 5.net wrote:
I am trying to find a simple example on how do telnet from VBA, but I
am not having any luck. Most of the information I am finding is out
dated or vauge at best.

Here is what I need to do,
1. Build a text file from a table.
2. FTP this file to a UNIX server.
3. Execute a UNIX command to process the file.

I have #1 and #2 working great, however I cant seem to find an easy
solution to make a telnet connection and execute 1 simple command.

Does anyone have any sample code to do this?
Not a lot of (good) samples out there. Check out my post on this from about a month or two
ago:

http://groups.google.com/group/comp....e82091c7b3eecb

(of course this URL will wrap...)

--
'---------------
'John Mishefske
'---------------
Sep 12 '06 #5
an*****@station 5.net wrote:
Thanks for the reply,

My problem is Telnet, How do I telnet from VBA so that I can execute a
command on a UNIX box.
AJS

pi********@hotm ail.com wrote:
Your description of the problem is unclear. Do you mean you can't get
the FTP to work? There's code at Randy Birch's site for that, I'm
sure. www.mvps.org/vbnet just search around. there's TONS of code
there, and I'm positive there's code for doing FTP. As for getting the
server to process the file - not a clue.
Putty is preferrable to telnet if security is an issue. '69 Camaro
provided the following link:

http://www.chiark.greenend.org.uk/~s.../download.html

I'm not sure about the best way to use it from VBA. Adapt the source
code into a DLL? Write an interface that VBA can use to automate
putty? Shell to putty in combination with a command script created by
VBA? Maybe FTP up a file that unix will run later (cron?):

http://groups.google.com/group/comp....776898abd92477

James A. Fortune
CD********@Fort uneJames.com

Access Tip:

Use the default property name for a control explicitly instead of
relying on the default for the control implicitly. It's good practice
to put, e.g., .Value in so that if the default for the control changes
in a future version of Access the code will survive the conversion
process providing .Value still exists. Also, note the following
example from "Dao Object Model - The Definitive Reference" by Helen
Feddema (ISBN: 1-56592-435-5 O'Reilly 2000):

"For example, the following two statements appear to be more or less
identical:

strCustomer = rst.Fields("Con tactName")
Set fld = rst.Fields("Con tactName")

However, the first line uses the default Value property to retrieve the
value of the ContactName field for the current record. The second
line, on the other hand, uses the default Item property to retrieve the
Field object that represents the ContactName column. Changing the
first line of code to:

strCustomer = rst.Fields("Con tactName").Valu e

would remove the ambiguity.

....

For example, the following two statements appear to be more or less
identical:

blnSpecialCusto mer = tdf.Properties( "Special")
Set prp = tdf.Properties( "Special")

However, the first line uses the default Value property to retrieve the
value of the Special user-defined Boolean property. The second line,
on the other hand, uses the default Item property to retrieve the
Property object itself. Changing the first line of code to:

blnSpecialCusto mer = tdf.Properties( "Special").Valu e

would remove the ambiguity."

Sep 12 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
50315
by: Dan | last post by:
I'm writing a simplistic telnet client in VB6 and I've run into a small snag. The program has a textbox to write in the string to be sent using ..SendData and has another textbox that displays what that server sends. When I first connect to the server (in this case, my university's smtp server), I get a response that the server acknowledges my connection. When I type something into the textbox and send it, however, I get no response...
3
8659
by: Yannick Turgeon | last post by:
Hello all, I'm currently trying to pass commands to a telnet session and get the texte generated (stdin + stdout) by the session. The problem I get is that the Telnet.read_until() function seems to freeze after a couple of command. I did a simplify script that reproduce the problem each time (I'm using 2.3.4 on W2K):
4
11181
by: Donnal Walter | last post by:
On Windows XP I am able to connect to a remote telnet server from the command prompt using: telnet nnn.nnn.nnn.nnn 23 where nnn.nnn.nnn.nnn is the IP address of the host. But using telnetlib, this code returns the traceback that follows: import telnetlib host = 'nnn.nnn.nnn.nnn'
2
8273
by: john brown | last post by:
I'm telnetting into a router. Apart from the fact I can't seem to view the output when iniciating the session, I can't match one of the expressions using Net::Telnet. I can telnet into the router manually without a problem. I'm running a sniffer at the same time just to see what's happening behind the scenes. The computer does an ARP request looking for the router's direction, but that seems to be it. I don't think any data actually...
0
7268
by: CJ | last post by:
Can someone look at the code below and tell me whats going on? Here is the problem. I can successfully telnet one of our routers and successfully put in a command in the while statement, but when the loop goes around a second time, it gives me: "pattern match timed-out at c:\filename.pl line 21" It can't get past the waitfor statement for a prompt the 2nd go around in the loop.
2
4583
by: eight02645999 | last post by:
hi i am using a telnet session to simulate an authentication mechanism USER = "user" PASSWORD = "password" try: telnet = telnetlib.Telnet(HOST) telnet.set_debuglevel(5) telnet.read_until("login: ") telnet.write(USER + "\n") telnet.read_until("Password: ")
2
5179
by: thilandeneth | last post by:
i need to do telnet via a web server please give me a idia to initiate the project following requirements are needed 1 Create web based custom telnet client to communicate with remote destinations. must provide login security before make communication 2 telnet communication should not be a direct 1 to 1 communication and that must be as follows Web telnet client -à Web server (telnet client) -à destination (see figure 01)
1
8537
by: perlxyo999 | last post by:
Hi , I have a problem doing manipulation (like split) in string comeing back from telnet commnd : $HOST = 'xxx'; $USER = 'yyy20'; $PASS = 'yyy-pass'; #$telnet = Net::Telnet->new($HOST); #$telnet->login($USER,$PASS); $telnet = new Net::Telnet (Timeout => 30, Prompt => '/ $/');
6
5505
by: sherrygomindes | last post by:
Hi I have written a perl script using the Telnet module. I need to remotely login in from one windows XP machine to another XP machine. But i get errors which i can't figure out the reason. Please someone help me its very very urgent. here is my code: #!/usr/bin/perl -w
17
7341
by: ravimath | last post by:
Dear all, I have written following script to loin to router bu it is showing error. #!c:\Perl\bin; use strict; use warnings; my $hostname = 'REMOVED FOR YOUR PROTECTION'; my $password = 'REMOVED FOR YOUR PROTECTION';
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.