VBA Telnet ?????

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • anthony@station5.net

    #1

    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

  • pietlinden@hotmail.com

    #2
    Re: VBA Telnet ?????

    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.

    Comment

    • anthony@station5.net

      #3
      Re: VBA Telnet ?????

      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

      pietlinden@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.

      Comment

      • David W. Fenton

        #4
        Re: VBA Telnet ?????

        anthony@station 5.net wrote in
        news:1158003006 .998660.313270@ 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/

        Comment

        • John Mishefske

          #5
          Re: VBA Telnet ?????

          anthony@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:



          (of course this URL will wrap...)

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

          Comment

          • CDMAPoster@FortuneJames.com

            #6
            Re: VBA Telnet ?????

            anthony@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
            >
            pietlinden@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:



            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?):



            James A. Fortune
            CDMAPoster@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."

            Comment

            Working...