+ Reply to Thread
Results 1 to 2 of 2

access a website with username/password

Hybrid View

  1. #1
    Registered User
    Join Date
    11-16-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    1

    access a website with username/password

    Hi,

    I'm a new user to excel VBA. I'm trying to create a simple macro which would allow me to open an internet explorer broser, to a website, for example, hotmail, and automatically input my username and password.

    Can anybody help??

    Thanks

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: access a website with username/password

    I do this every time I access this Forum. I have Ruby installed on my PC and also WATIR which is a Ruby based web testing library. Both are open source and free.

    Running the following Ruby Program logs me onto this forum and looks for unanswered posts.

    require 'watir'
    require 'watir/WindowHelper'
    include Watir
    require 'test/unit'
    class TC_recorded < Test:: Unit:: TestCase
     def test_1
      $IE0 = IE.new
    
      $IE0.goto("http://www.excelforum.com/search.php")
      $IE0.wait
        $IE0.form( :name, "vbform").select_list( :name, "replyless").select('At Most')
    $IE0.wait
        $IE0.form( :name, "vbform").select_list( :name, "searchdate").select('A Week Ago')
      $IE0.wait
        $IE0.form( :name, "vbform").button( :name, "dosearch").click
      
     end
    end
    Similarly for threads that I am involved in

    require 'watir'
    require 'watir/WindowHelper'
    include Watir
    require 'test/unit'
    class TC_recorded < Test:: Unit:: TestCase
     def test_1
      $IE0 = IE.new
      $IE0.goto("http://www.excelforum.com/search.php")
      $IE0.wait
      $IE0.form( :name, "vbform").text_field( :name,"searchuser").set("mrice")
        $IE0.wait
        $IE0.form( :name, "vbform").select_list( :name, "replyless").select('At Least')
      $IE0.wait
        $IE0.form( :name, "vbform").button( :name, "dosearch").click
      
     end
    end
    If you macro shells the ruby executable with a file like the above as an argument, you will get the effect that you want.
    Martin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1