Results 1 to 6 of 6

Thread: Send Data

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2011
    Posts
    191

    Send Data

    I hate to be the one to dig up an old post but i have a question .

    where you see /badger.exe


    Code:
    Private Sub Sck_Connect()
    
        Sck.SendData "HEAD /badger.exe HTTP/1.0" & vbNewLine & _
                            "Host: www.woof.com" & vbNewLine & _
                            "User-Agent: blah blah..." & vbNewLine & vbNewLine
        End Sub
    I'm trying to get it to accept a new file from a TextBox.
    It works fine if do it like this:

    Code:
    Private Sub Sck_Connect()
    option1 = "/something/somethingelse/"
    option2 = "file.exe"
        Sck.SendData "HEAD " & option1 & Option2 & " HTTP/1.0" & vbNewLine & _
                            "Host: www.woof.com" & vbNewLine & _
                            "User-Agent: blah blah..." & vbNewLine & vbNewLine
        End Sub
    But i Can't get it to accept those values outside the Sub routine.
    Any help on this at all would greatly appreciated

    Thanks in Advance

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Find file size of remote file ie http://www.noteme.com/wokawidget/tickicon.gif

    You shouldn't post questions in threads started by others (called hijacking), especially if the thread was dead for 6 years. Instead, started your own thread and post a link to any other existing relevant thread.

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Send Data

    Posts split off to a new separate thread.

    please dont bump old threads, just post a new thread next time and reference the old threads url

    Thanks


    Original Thread - http://www.vbforums.com/showthread.php?t=319132
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Send Data

    I'm not sure if I understand the question properly, but if you want to process a file specified in a TextBox just use the TextBox's Text property:
    Code:
    Private Sub Sck_Connect()
        Sck.SendData "HEAD " & txtBox.Text & " HTTP/1.0" & vbNewLine & _
                            "Host: www.woof.com" & vbNewLine & _
                            "User-Agent: blah blah..." & vbNewLine & vbNewLine
    End Sub
    Where txtBox.Text = "/something/somethingelse/file.exe"

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2011
    Posts
    191

    Re: Send Data

    Again My opologies for doing something i shouldn't,

    I was under the impression that all post's regardless how old they were, were still just as valuable today as they were when they were first posted.
    I guess it's a good thing i didn't post a new thread, and then add a reference back to the original code i was asking about in the first place, then everyone would have goto that thread to see what is was i was asking about.

    So everyone from that 2005 Post and all code associated with it..you and the code are all now Obsolete


    Feel Free to delete this post since obviously there's nothing of any use to anyone in it..

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2011
    Posts
    191

    Re: Send Data

    Doogle no worries Mate i'll figure it out on my own

    thats the way things seem to always work out for me in the end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width