PDA

View Full Version : Having an Excel file open a website at a specified time



Malkavian
09-08-2016, 11:29 AM
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!

Malkavian
09-08-2016, 11:34 AM
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.

offthelip
09-08-2016, 02:58 PM
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

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

SamT
09-08-2016, 03:11 PM
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.