filling forms in IE from excel sheet

H

Hedghog

Hi there

[Excel 2003 - VBA]

I'm kind of modest in my vba abilities, but I seem to be pretty good at
researching what I need and copying and modifying publically published
macros. I'm hoping to find something or someone who can do this...

I've seen a few threads touching on this topic:

Let's say I have data in "Sheet1" cells A1 through A10

And I have a webpage open, which my macro already finds it specifically and
gives it the focus (restores/maximizes it).

What I want to do is say "Copy cell A1, and paste in the webpage's input
field" and then move through the different fields copying the subsequent cell
values from excel.

I've identified the following stuff from the page code:

<label>Programme Title

<input name="programmeTitle" type="text" class="bodyText"
tabindex="1002" size="26" value="" maxlength="100"/>

</label>

<input name="episodeTitle" type="text" class="bodyText" tabindex="1003"
size="26" value="" maxlength="100"/>

</label></th>


Now that I have these inputboxes' names, what do I write in my macro to say
"copy and paste A1's cell data into "input box 'episodeTitle' " etc etc

I cannot see clear syntax or functions in any of the examples I've looked
through so far.

Macro so far only looks like this:

Code:
Public Sub Find_IE_Windows()

Dim Shell As Object
Dim IE As Object



Set Shell = CreateObject("Shell.Application")


For Each IE In Shell.Windows
If IE.LocationURL =
"http://tvlistings.prod.nm.bskyb.com/saotv-console/addScheduleItem.do" Then

IE.Visible = True
End If
Next


End Sub

So now that this page has the focus, can soemone help me tell my macro to do
the copy and paste?

Would be MUCH appreciated (I will send you many happy thoughts)

Cheers
H
 
T

Tim Williams

IE.document.getElementsByName("programmeTitle").value = _
Sheet1.Range("A1").value

etc...

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top