Website access with a password

mummbles74

Board Regular
Joined
Nov 14, 2009
Messages
120
Office Version
  1. 365
Platform
  1. Windows
I have managed to get access to a webiste using VBA ready to access the data table that I need to copy to a spread sheet, before I attempt this I am getting stuck after I have entered the username and password.

I am using the code below:

Sub Test()
Set ie = CreateObject("InternetExplorer.application")
ie.Visible = True
ie.Navigate2 "extranet.deritend.co.uk/portal/login.php"
Do
If ie.readyState = 4 Then
'ie.Visible = False
Exit Do
Else
DoEvents
End If

Loop
ie.document.forms(0).all("Username").Value = "me"
ie.document.forms(0).all("Pin").Value = "password"
ie.document.forms(0).submit
end sub

And all works fine until the next page on the website loads, all it is normally is a page with the standard site header and 1 grey box that you need to click on to access the main part of the website. I have viewed the source code but the button is not named so have no idea how to "click" it using VBA code.

Any ideas?

This is the source code for the button that I can not select ( I have removed the < from the begining of each line so that it does not creat a picture on here, hopefully)

table>
tr><td>
input type=submit value="Login Succeeded - Click to Continue">
/td></tr>
/table>
br>

Thanking you in advance as always

Please Help!!
<FORM action=index.php method=post target=_parent> </FORM>
 
The site that I have navigated to is just a header and this table, ideally I would like to just copy the table that I require, have you any examples of the code?
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Can you post the URL?

Without that it's pretty hard to post code that's specific to the page.

Here's generic code that will extract the data from a table:
Code:
Sub GetTableData(ByRef tbl, rng As Range)
Dim cl As Object
Dim rw As Object
Dim I As Long
    For Each rw In tbl.Rows
        For Each cl In rw.Cells
            rng.Value = cl.outerText
            Set rng = rng.Offset(, 1)
        Next cl
        Set rng = Cells(rng.Row + 1, 1)
    Next rw

End Sub
All you need to do is pass a reference to the table and the range you want the data to start in on the worksheet.
 
Upvote 0
the url is extranet.deritend.co.uk/portal/bpcurrent.php

but not sure you will be able to access if that is what you require.

I'm sorry if the questions I ask are simple but how do I tell the code to reference the table on the web page
 
Upvote 0
this is the source code from the page.

<!doctype html public "-//w3c//dtd// xhtml 1.0 transitional//en"
http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd>
<html>
<head>


<!--Start of Style Sheet-->
<style type="text/css">
body { margin-top: 1%; margin-left: 1%; margin-right: 1%; scrollbar-base-color: #05b3b1;
scrollbar-arrow-color: #05b3b1; scrollbar-face-color: #b4d7ec;
scrollbar-shadow-color: #ffa500; }
.tbl { background-color: #f8f8f8; }
.box1 { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #333333;
font-weight: bold; background-color: #05b3b1; border-style: solid;
border-width: 1.5px; border-color: #333333;}
.box2 { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #333333;
background-color: #feeee6; border-style: solid; border-width: 1.5px;
border-color: #333333;}
.box3 { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #333333;
background-color: #eafefe; border-style: solid; border-width: 1.5px;
border-color: #333333;}
.box5 { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #000000;
background-color: #ff0000; border-style: solid; border-width: 1.5px;
border-color: #333333;}
.box4 { background-color: #05b3b1; border-style: solid; border-width: 1.5px;
border-color: #333333;}
.ntr { background: #05b3b1; color: #333333; font-size: 0.8em; border-style: solid;
border-width: 2.5px; border-color: #ffa500;}
form{scrollbar-base-color: #c0c0c0;
scrollbar-arrow-color: #000000;
scrollbar-DarkShadow-Color:#cccccc;}
</style>
<style type="text/css">
@import url(scrolling_table.css);
</style>

<!--End of Style Sheet-->
</head>
<body bgcolor="#010101">
<font face=verdana size=5 color="#ff8000"><i>Open Jobs</i> <font size="-1">(uninvoiced) - <i>Jobs in red are awaiting customer instruction</i></font></a>
<form>
<table width="100%" class="tb">
<tr class="box1" cellpadding="5" cellspacing="5">
<td>
Job No
</td>
<td>
Description
</td>
<td>EX</td>
<td>
Maximo Location
</td>
<td>
Started
</td>

<td>Due Date
</td>
<td>Delivered</td>

</tr>


<tr class="box3" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B17390 ><b>B17390 </b></a>
</td>
<td>
5.5KWM-G26-370-BM 10323631
</td>
<td>N/A</td>
<td>
G26-370-BM
</td>

<td>
13/12/2010
</td>
<td>
28/08/2011
</td>
<td>

</td>
</tr>

<tr class="box5" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B17462 ><b>B17462 </b></a>
</td>
<td>
1.5KW FLP-73-AT-652 10323686
</td>
<td>ExD</td>
<td>
73-AT-652
</td>

<td>
10/01/2011
</td>
<td>
29/08/2011
</td>
<td>

</td>
</tr>

<tr class="box3" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="Existing motor is 22kw - PL says to replace with 18.5kw." href=jobinfo_rep.php?jobref=B17574 ><b>B17574 </b></a>
</td>
<td>
22KWM-E41-008-AM 10326102
</td>
<td>ExN</td>
<td>
E41-008-AM
</td>

<td>
04/02/2011
</td>
<td>
28/08/2011
</td>
<td>

</td>
</tr>

<tr class="box5" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="Brian to witness dismantle." href=jobinfo_rep.php?jobref=B17642 ><b>B17642 </b></a>
</td>
<td>
375KWM-G22-005-M 10323547
</td>
<td>ExN</td>
<td>
G22-005-M
</td>

<td>
21/02/2011
</td>
<td>
29/08/2011
</td>
<td>

</td>
</tr>

<tr class="box5" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="Paul Larsen to supply spare motor to cannibalise." href=jobinfo_rep.php?jobref=B17644 ><b>B17644 </b></a>
</td>
<td>
22KWM-G32-020-AM 10318239
</td>
<td>ExN</td>
<td>
G32-020-AM
</td>

<td>
21/02/2011
</td>
<td>
29/08/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B17820 ><b>B17820 </b></a>
</td>
<td>
4KWM-G73-085-M 10331399
</td>
<td>ExD</td>
<td>
G73-085-M
</td>

<td>
11/04/2011
</td>
<td>
28/08/2011
</td>
<td>

</td>
</tr>

<tr class="box5" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18042 ><b>B18042 </b></a>
</td>
<td>
3.3KVM-G71-282-M 10284183
</td>
<td>N/A</td>
<td>
G71-282-M
</td>

<td>
10/06/2011
</td>
<td>
26/08/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18152 ><b>B18152 </b></a>
</td>
<td>
2.6KWM-E22-054-01M 10336726
</td>
<td>N/A</td>
<td>
E22-054-01M
</td>

<td>
08/07/2011
</td>
<td>
31/08/2011
</td>
<td>

</td>
</tr>

<tr class="box3" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18230 ><b>B18230 </b></a>
</td>
<td>
110KWM-G22-009-SM 10338734
</td>
<td>ExN</td>
<td>
G22-009-SM
</td>

<td>
27/07/2011
</td>
<td>
25/08/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="New EEMUA motor on order - 13 weeks delivery" href=jobinfo_rep.php?jobref=B18232 ><b>B18232 </b></a>
</td>
<td>
3KWM-MS08-004-M 10338533 due Nov 11
</td>
<td>ExN</td>
<td>
MS08-004-M
</td>

<td>
27/07/2011
</td>
<td>
07/11/2011
</td>
<td>

</td>
</tr>

<tr class="box3" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18242 ><b>B18242 </b></a>
</td>
<td>
3.3KVM-G44-002-BM 10327821
</td>
<td>ExN</td>
<td>
G44-002-BM
</td>

<td>
28/07/2011
</td>
<td>
05/09/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18258 ><b>B18258 </b></a>
</td>
<td>
acm no detaills G13-015-M 10336525
</td>
<td>N/A</td>
<td>
G13-015-M
</td>

<td>
03/08/2011
</td>
<td>
24/08/2011
</td>
<td>

</td>
</tr>

<tr class="box3" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18278 ><b>B18278 </b></a>
</td>
<td>
FM-E22-054-02M 10339021
</td>
<td>N/A</td>
<td>
E22-054-02M
</td>

<td>
05/08/2011
</td>
<td>
30/08/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18279 ><b>B18279 </b></a>
</td>
<td>
0.25 FANM-CTC FAN BOULT WEST 10326104
</td>
<td>N/A</td>
<td>
Boultings CTC Fan
</td>

<td>
05/08/2011
</td>
<td>
15/09/2011
</td>
<td>

</td>
</tr>

<tr class="box5" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18287 ><b>B18287 </b></a>
</td>
<td>
3.3KVM-G41-003-BM 10339573
</td>
<td>FLP GP2</td>
<td>
G41-003-BM
</td>

<td>
09/08/2011
</td>
<td>
25/08/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
B18293
</td>
<td>
S/O LS FM-E22-054 10336726
</td>
<td>N/A</td>
<td>
E22-054
</td>

<td>
11/08/2011
</td>
<td>
14/11/2011
</td>
<td>

</td>
</tr>

<tr class="box3" cellpadding="5" cellspacing="5">
<td>
B18294
</td>
<td>
S/O LSFM-E22-054 10339021
</td>
<td>N/A</td>
<td>
E22-054
</td>

<td>
11/08/2011
</td>
<td>
14/11/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18295 ><b>B18295 </b></a>
</td>
<td>
3.3KVM-G13-009-AM 10288790
</td>
<td>ExN</td>
<td>
G13-009-AM
</td>

<td>
11/08/2011
</td>
<td>
05/09/2011
</td>
<td>

</td>
</tr>

<tr class="box3" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18315 ><b>B18315 </b></a>
</td>
<td>
18.5KW G75-055-M 10339066
</td>
<td>ExN</td>
<td>
G75-055-M
</td>

<td>
18/08/2011
</td>
<td>
31/08/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18321 ><b>B18321 </b></a>
</td>
<td>
11KW E57-007-DM 10331220
</td>
<td>ExN</td>
<td>
E57-007-DM
</td>

<td>
19/08/2011
</td>
<td>
31/08/2011
</td>
<td>

</td>
</tr>

<tr class="box3" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18322 ><b>B18322 </b></a>
</td>
<td>
15KW E57-011-AM 10335601
</td>
<td>ExN</td>
<td>
E57-011-AM
</td>

<td>
19/08/2011
</td>
<td>
31/08/2011
</td>
<td>

</td>
</tr>

<tr class="box2" cellpadding="5" cellspacing="5">
<td>
<a target=_new title="No comments added to this job" href=jobinfo_rep.php?jobref=B18323 ><b>B18323 </b></a>
</td>
<td>
500HP G41-003-BM 10339573
</td>
<td>FLP GP2</td>
<td>
G41-003-BM
</td>

<td>
19/08/2011
</td>
<td>
07/09/2011
</td>
<td>

</td>
</tr>

</table>
</form>
</body>
</html>
 
Upvote 0
Is it the table with headings Job No, Description, EX, Maximo Location etc?

I've only had a quick look but you can give this a try, it assumes the table is the only one on the page.
Code:
Dim doc As Object
Dim tbl As Object
Dim ws As Worksheets
Dim rng As Range
 
' code to open IE and navigate, login etc
 
' once you reach the page
' get a reference to the page's document
Set doc = IE.document
 
' get the collection of TABLE elements in the document and return a reference to the first table (0)
Set tbl = doc.GetElementsByTagName("TABLE")(0)
 
' create new worksheet for data
Set ws = Worksheets.Add
 
Set rng = ws.Range("A1")
 
GetTableData tbl, rng
 
' any other code
 
 
' close IE and clean up a bit
IE.Quit
 
Set IE = Nothing

PS Probably best not to post the all the source code, it doesn't usually work anyway and tends to take up a lot of space.:)
 
Upvote 0
Sorry that seemed not to work properly, try again


PHP:
[QUOTE]" " [URL]http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd[/URL]>
"
"
 
 
"<!--Start of Style Sheet-->
"<STYLE type=text/css>
 "body  { margin-top: 1%; margin-left: 1%; margin-right: 1%; scrollbar-"base-color: #05b3b1;
         scrollbar-arrow-color: #05b3b1; scrollbar-face-color: #b4d7ec;
         scrollbar-shadow-color: #ffa500; }
 .tbl  { background-color: #f8f8f8; }
 .box1 { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #333333;
         font-weight: bold;  background-color: #05b3b1; border-style: solid;
         border-width: 1.5px; border-color: #333333;}
 .box2 { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #333333;
         background-color: #feeee6; border-style: solid; border-width: 1.5px;
         border-color: #333333;}
 .box3  { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #333333;
         background-color: #eafefe; border-style: solid; border-width: 1.5px;
         border-color: #333333;}
 .box5  { font-family: arial, helvetica, sans-serif; font-size: 8pt; color: #000000;
         background-color: #ff0000; border-style: solid; border-width: 1.5px;
         border-color: #333333;}
 .box4 { background-color: #05b3b1; border-style: solid; border-width: 1.5px;
   border-color: #333333;}
 .ntr  { background: #05b3b1; color: #333333; font-size: 0.8em; border-style: solid;
         border-width: 2.5px; border-color: #ffa500;}
form{scrollbar-base-color: #c0c0c0;
scrollbar-arrow-color: #000000;
scrollbar-DarkShadow-Color:#cccccc;}
"</STYLE>
"<STYLE type=text/css>
    @import url(scrolling_table.css);
"</STYLE>
 
"<!--End of Style Sheet-->
"
"
"[FONT=verdana][SIZE=5][COLOR=#ff8000][I]Open Jobs[/I] [SIZE=-1](uninvoiced) - [I]Jobs in red are awaiting customer instruction[/I][/SIZE]
"<FORM>
"<TABLE class=tb width="100%">
<TBODY><TR class=box1 cellspacing="5" cellpadding="5">
"<TD>
Job No 
"
</TD>
"<TD>
Description
"
</TD>
"<TD>EX</TD>
"<TD>
Maximo Location
"
</TD>
" <TD>
Started
"
</TD>
 
" 
<TD>Due Date
"
</TD>
" <TD>Delivered</TD>
 
" 

</TR>
 
 
" 
<TR class=box3 cellspacing="5" cellpadding="5">
" <TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B17390"][B]B17390 [/B][/URL]

</TD>
<TD>
5.5KWM-G26-370-BM 10323631 

</TD>
<TD>N/A</TD>
<TD>
G26-370-BM 

</TD>
 

<TD>
13/12/2010

</TD>
<TD>
28/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box5 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B17462"][B]B17462 [/B][/URL]

</TD>
<TD>
1.5KW FLP-73-AT-652 10323686 

</TD>
<TD>ExD</TD>
<TD>
73-AT-652 

</TD>
 

<TD>
10/01/2011

</TD>
<TD>
29/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box3 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B17574"][B]B17574 [/B][/URL]

</TD>
<TD>
22KWM-E41-008-AM 10326102 

</TD>
<TD>ExN</TD>
<TD>
E41-008-AM 

</TD>
 

<TD>
04/02/2011

</TD>
<TD>
28/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box5 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B17642"][B]B17642 [/B][/URL]

</TD>
<TD>
375KWM-G22-005-M 10323547 

</TD>
<TD>ExN</TD>
<TD>
G22-005-M 

</TD>
 

<TD>
21/02/2011

</TD>
<TD>
29/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box5 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B17644"][B]B17644 [/B][/URL]

</TD>
<TD>
22KWM-G32-020-AM 10318239 

</TD>
<TD>ExN</TD>
<TD>
G32-020-AM 

</TD>
 

<TD>
21/02/2011

</TD>
<TD>
29/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box2 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B17820"][B]B17820 [/B][/URL]

</TD>
<TD>
4KWM-G73-085-M 10331399 

</TD>
<TD>ExD</TD>
<TD>
G73-085-M 

</TD>
 

<TD>
11/04/2011

</TD>
<TD>
28/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box5 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18042"][B]B18042 [/B][/URL]

</TD>
<TD>
3.3KVM-G71-282-M 10284183 

</TD>
<TD>N/A</TD>
<TD>
G71-282-M 

</TD>
 

<TD>
10/06/2011

</TD>
<TD>
26/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box2 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18152"][B]B18152 [/B][/URL]

</TD>
<TD>
2.6KWM-E22-054-01M 10336726 

</TD>
<TD>N/A</TD>
<TD>
E22-054-01M 

</TD>
 

<TD>
08/07/2011

</TD>
<TD>
31/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box3 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18230"][B]B18230 [/B][/URL]

</TD>
<TD>
110KWM-G22-009-SM 10338734 

</TD>
<TD>ExN</TD>
<TD>
G22-009-SM 

</TD>
 

<TD>
27/07/2011

</TD>
<TD>
25/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box2 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18232"][B]B18232 [/B][/URL]

</TD>
<TD>
3KWM-MS08-004-M 10338533 due Nov 11 

</TD>
<TD>ExN</TD>
<TD>
MS08-004-M 

</TD>
 

<TD>
27/07/2011

</TD>
<TD>
07/11/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box3 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18242"][B]B18242 [/B][/URL]

</TD>
<TD>
3.3KVM-G44-002-BM 10327821 

</TD>
<TD>ExN</TD>
<TD>
G44-002-BM 

</TD>
 

<TD>
28/07/2011

</TD>
<TD>
05/09/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box2 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18258"][B]B18258 [/B][/URL]

</TD>
<TD>
acm no detaills G13-015-M 10336525 

</TD>
<TD>N/A</TD>
<TD>
G13-015-M 

</TD>
 

<TD>
03/08/2011

</TD>
<TD>
24/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box3 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18278"][B]B18278 [/B][/URL]

</TD>
<TD>
FM-E22-054-02M 10339021 

</TD>
<TD>N/A</TD>
<TD>
E22-054-02M 

</TD>
 

<TD>
05/08/2011

</TD>
<TD>
30/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box2 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18279"][B]B18279 [/B][/URL]

</TD>
<TD>
0.25 FANM-CTC FAN BOULT WEST 10326104 

</TD>
<TD>N/A</TD>
<TD>
Boultings CTC Fan 

</TD>
 

<TD>
05/08/2011

</TD>
<TD>
15/09/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box5 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18287"][B]B18287 [/B][/URL]

</TD>
<TD>
3.3KVM-G41-003-BM 10339573 

</TD>
<TD>FLP GP2</TD>
<TD>
G41-003-BM 

</TD>
 

<TD>
09/08/2011

</TD>
<TD>
25/08/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box2 cellspacing="5" cellpadding="5">
<TD>
B18293

</TD>
<TD>
S/O LS FM-E22-054 10336726 

</TD>
<TD>N/A</TD>
<TD>
E22-054 

</TD>
 

<TD>
11/08/2011

</TD>
<TD>
14/11/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box3 cellspacing="5" cellpadding="5">
<TD>
B18294

</TD>
<TD>
S/O LSFM-E22-054 10339021 

</TD>
<TD>N/A</TD>
<TD>
E22-054 

</TD>
 

<TD>
11/08/2011

</TD>
<TD>
14/11/2011

</TD>
<TD>
 

</TD>

</TR>
 

<TR class=box2 cellspacing="5" cellpadding="5">
<TD>
[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18295"][B]B18295 [/B][/URL]

</TD>
<TD>
3.3KVM-G13-009-AM 10288790 

</TD>
<TD>ExN</TD>
<TD>
G13-009-AM 

</TD>
 

<TD>
11/08/2011
" 
</TD>
" <TD>
" 05/09/2011
" 
</TD>
" <TD>
" 
" 
</TD>
" 
</TR>
" 
" 
<TR class=box3 cellspacing="5" cellpadding="5">
" <TD>
"[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18315"][B]B18315 [/B][/URL]
"
</TD>
" <TD>
" 18.5KW G75-055-M 10339066 
" 
</TD>
"<TD>ExN</TD>
" <TD>
" G75-055-M 
" 
</TD>
 
"
<TD>
"18/08/2011
"
</TD>
"<TD>
" 31/08/2011
" 
</TD>
" <TD>
" 
" 
</TD>
" 
</TR>
" 
" 
<TR class=box2 cellspacing="5" cellpadding="5">
" <TD>
"[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18321"][B]B18321 [/B][/URL]
"
</TD>
" <TD>
" 11KW E57-007-DM 10331220 
" 
</TD>
"<TD>ExN</TD>
"<TD>
"E57-007-DM 
" 
</TD>
 
" 
<TD>
" 19/08/2011
" 
</TD>
" <TD>
" 31/08/2011
" 
</TD>
" <TD>
" 
" 
</TD>
" 
</TR>
" 
" 
<TR class=box3 cellspacing="5" cellpadding="5">
" <TD>
"[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18322"][B]B18322 [/B][/URL]
"
</TD>
" <TD>
" 15KW E57-011-AM 10335601 
" 
</TD>
"<TD>ExN</TD>
" <TD>
" E57-011-AM 
" 
</TD>
 
" 
<TD>
" 19/08/2011
" 
</TD>
" <TD>
" 31/08/2011
" 
</TD>
" <TD>
" 
" 
</TD>
" 
</TR>
" 
" 
<TR class=box2 cellspacing="5" cellpadding="5">
" <TD>
"[URL="http://www.mrexcel.com/forum/jobinfo_rep.php?jobref=B18323"][B]B18323 [/B][/URL]
"
</TD>
"<TD>
"500HP G41-003-BM 10339573 
"
</TD>
"<TD>FLP GP2</TD>
"<TD>
"G41-003-BM 
"
</TD>
 
"
<TD>
"19/08/2011
"
</TD>
"<TD>
"07/09/2011
"
</TD>
"<TD>
 
"
</TD>
"
</TR>
 
"


</TABLE>
"</FORM>
"
"
[/COLOR][/SIZE][/FONT][/QUOTE]
 
Upvote 0
Cheers Norrie

that works great, out of interest what would I change if there were multiple tables.

All the help has been much appreciated as always.
 
Upvote 0
You would loop through the collection of TABLE elements passing each one to the GetTableData function.

You'd probably also want to change the worksheet/range for each table, or at just the range, to make sure data doesn't get overwritten.
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,480
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top