Consulting

Results 1 to 4 of 4

Thread: Having an Excel file open a website at a specified time

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Question Having an Excel file open a website at a specified time

    Hi!

    Everyday, ~30 times a day, I need to go on a website and enter a specific number in a text box.

    I have to do it on average 30 times a day and only have a window of 10 seconds to do it every time.

    Each morning I have all the information for my ~30 data entries but have to wait to do it manually 30 times during each 10 second windows...


    This is somewhat annoying and stressful.

    Do you think I could program something combining Excel and VBA when I count enter all the times (hours:min:sec) and numbers to enter?

    The Excel worksheet could look like something like this:

    Address (A): Time (B): Number (C):
    www abccc/111111 com 10:32:23 87.345
    www abccc/222222 com 11:42:20 88.546
    www abccc/333333 com 14:11:05 88.578
    www abccc/444444 com 16:32:29 89.157
    www abccc/555555 com 16:39:55 84.523
    www abccc/666666 com 18:58:26 83.178

    And each morning I could fill all 3 columns and some VBA coding on the background would open the specified website (address) at the right time (B) and enter the corresponding number (C) in the text box.

    Do you think that could be done?
    If you think there is already a program that could do just that or if you can think or a better way of doing this, please let me know!
    Last edited by Malkavian; 09-08-2016 at 11:49 AM.

  2. #2
    I cannot provide the actual website but it looks somewhat like this:

    foodblogsearch (DOT) com

    2 tabs gets you to the text box then you enter a value and press enter.

  3. #3
    VBAX Expert
    Joined
    May 2016
    Posts
    604
    Location
    Here try this:
    The times for the triggers are in column B from row 2 to row 7
    The values are in Column C
    If you want more than six just change the loop counter
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using. Trial and error should get you there with any luck

    [VBA]Public IE As Object
    Sub submission()


    Application.ScreenUpdating = False
    Index = 2
    Set IE = CreateObject("InternetExplorer.Application")
    IE.Visible = True
    IE.navigate "http://www.foodblogsearch.com"


    Application.StatusBar = "Submitting"
    ' Wait while IE loading...
    While IE.Busy
    DoEvents
    Wend
    For i = 2 To 7
    Application.ScreenUpdating = True
    waittim = Cells(i, 2)
    Application.Wait waittim


    searchstr = Cells(i, 3)
    Application.ScreenUpdating = False
    IE.document.forms(0).elements(1).Value = searchstr
    IE.document.forms(0).elements(2).Click

    Application.ScreenUpdating = True
    Next i
    End Sub


    [/VBA]

  4. #4
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    Obviously you are going to need to find out which forms and and elements you need to write into on the web site you are using.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Posting Permissions

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