Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBA Telnet ?????

28 views
Skip to first unread message

ant...@station5.net

unread,
Sep 11, 2006, 2:11:55 PM9/11/06
to
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

pietl...@hotmail.com

unread,
Sep 11, 2006, 3:15:42 PM9/11/06
to
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.

ant...@station5.net

unread,
Sep 11, 2006, 3:30:07 PM9/11/06
to
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

David W. Fenton

unread,
Sep 11, 2006, 5:20:04 PM9/11/06
to
ant...@station5.net wrote in
news:1158003006.9...@h48g2000cwc.googlegroups.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/

John Mishefske

unread,
Sep 12, 2006, 12:22:35 AM9/12/06
to

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.databases.ms-access/browse_thread/thread/a9d96966a9bca92d/f1e82091c7b3eecb?lnk=gst&q=mishefske+telnet&rnum=1#f1e82091c7b3eecb

(of course this URL will wrap...)

--
'---------------
'John Mishefske
'---------------

CDMAP...@fortunejames.com

unread,
Sep 12, 2006, 2:41:15 AM9/12/06
to

Putty is preferrable to telnet if security is an issue. '69 Camaro
provided the following link:

http://www.chiark.greenend.org.uk/~sgtatham/putty/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.databases.ms-access/msg/57776898abd92477

James A. Fortune
CDMAP...@FortuneJames.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("ContactName")
Set fld = rst.Fields("ContactName")

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("ContactName").Value

would remove the ambiguity.

...

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

blnSpecialCustomer = 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:

blnSpecialCustomer = tdf.Properties("Special").Value

would remove the ambiguity."

0 new messages