run report on web page, import to excel

I need to run a report on a web page and import it to excel in an automatic 
way.

First I need to open this company internal web page: 
http://webha.kenmex.paccar.com/edc/default.aspx

and select the "1EDCMAT" report, here is part of the source code:

						</select><br>
												<span id="lblSelectReport">Select a saved report to 
automatically load it</span><br>
												<select name="selSavedReports" 
onchange="__doPostBack('selSavedReports','')" language="javascript" 
id="selSavedReports" tabindex="63">
							<option value="0">-- Select a Report --</option>
selected="selected" value="932">1EDCMAT</option>
							<option value="763">1EDCMAT x unidad</option>


and then I need to select todays date on the "Initiate Date" field:


				<td><span id="lblInitiateDt">Initiate Date</span></td><td>
									<table cellspacing="0" cellpadding="0">
										<tr>
											<td valign="top" style="WIDTH:80px"><input 
name="txtInitiateDtFrom" type="text" id="txtInitiateDtFrom" tabindex="26" 
onkeypress="return noenter()" 
style="height:21px;width:80px;POSITION:absolute" /></td>
											<td><IMG 
onclick="javascript:OpenCalendar('document.frmReport.txtInitiateDtFrom')" 
src="images/popupCalendarButton.gif"></td>
											<td> - </td>
											<td valign="top" style="WIDTH:80px"><input name="txtInitiateDtTo" 
type="text" id="txtInitiateDtTo" tabindex="27" onkeypress="return noenter()" 
style="height:21px;width:80px;POSITION:absolute" /></td>
											<td><IMG 
onclick="javascript:OpenCalendar('document.frmReport.txtInitiateDtTo')" 
src="images/popupCalendarButton.gif"></td>
											<td><span id="lblOptional6">(Optional)</span></td>
										</tr>
									</table>
								</td>
			</tr><tr>

and then hit the "Submit" button. After this an "Export to Excel" button 
appears so I would like for this to be automatically imported into a specific 
sheet in an excel file.

The thing is I would like to have this recorded as a VBA macro to import 
this directly into any users excel. But I absolutely have no idea where to 
start to make this work. I read thru some of the other posts but they are 
very specific to a given web page. That's why I included the source code. 

Any comments or suggestions are more than welcome!

Thanks, Martin L.
0
Utf
3/25/2010 12:21:01 AM
excel.programming 6508 articles. 2 followers. Follow

20 Replies
1389 Views

Similar Articles

[PageSpeed] 11

This might get you started or at least point into the right direction.
If i read your source  code correctly this should:
1. open up the site
2. select report
3. select date (make sure specify the format in the code as per my
comment in there)
4. click on submit button (make sure to find its ID in your source
code and amend my code accordingly - as per my comment).
I didn't go any further than that - i.e., i suggest you get this thing
working this far and then proceed to the 'import' section.

Sub Test()
    'Needs refferences to: _
        (1) shdocvw (Microsoft Internet Controls) _
        (2) mshtml (Microsoft HTML Object Library)

    'Check this out: http://www.mrexcel.com/forum/showthread.php?t=302438

    Dim ie As SHDocVw.InternetExplorer
    Dim varHtml As MSHTML.HTMLDocument

    Set ie = New SHDocVw.InternetExplorer

    With ie
        .Visible = True
        .Navigate2 "http://webha.kenmex.paccar.com/edc/default.aspx"

        'wait until IE finished loading the page
        Do Until Not ie.Busy And ie.ReadyState = 4
            DoEvents
        Loop

    End With

    Set varHtml = ie.Document

    With varHtml
        .getElementById("lblSelectReport").Value = 763 'I think 763
stands for 1EDCMAT
        .getElementById("lblInitiateDt").Value = Format(Now, "yyyy-mm-
dd") 'Replace this "yyyy-mm-dd" with the format that your site uses.
        .getElementById("YourSubmitButtonIDGoesHERE").Click 'Amend as
appropriete - find the id of your button and put in here

        'wait until IE finished loading the page
        Do Until Not ie.Busy And ie.ReadyState = 4
            DoEvents
        Loop
    End With

End Sub

0
AB
3/25/2010 1:17:54 PM

---------
I found this info in order to reference the shdocvw object, but the 
"Microsoft Internet Controls." option doesn't appear in the dialog box. Is 
there another way to reference it? And I only have limited internet/intranet 
access here at work so I can't access the "mrexcel.com/forum". 

"The References dialog box lists all the objects available to Visual Basic. 
You access the dialog box by selecting Tools/References from the menu bar. 
Figure 3-5 shows the References dialog box with a reference set to the 
Internet Explorer object library. The proper reference is described in the 
dialog box as "Microsoft Internet Controls." "
0
Utf
3/25/2010 2:49:01 PM
It might also be called something along 'Microsoft Browser
Helper' (it's an interesting one as once you reference it - it would
change to 'Microsoft Internet Controls' anyway.

You can try using late binding instead and declare it object but it's
way easier to get the refference as you'd need to amend the code to
drop constants and replace the =3DNew with Create Object. So, try
finidng the Browser Helper refference in the first place.


On Mar 25, 2:49=A0pm, MartinL <Mart...@discussions.microsoft.com> wrote:
> ---------
> I found this info in order to reference the shdocvw object, but the
> "Microsoft Internet Controls." option doesn't appear in the dialog box. I=
s
> there another way to reference it? And I only have limited internet/intra=
net
> access here at work so I can't access the "mrexcel.com/forum".
>
> "The References dialog box lists all the objects available to Visual Basi=
c.
> You access the dialog box by selecting Tools/References from the menu bar=
..
> Figure 3-5 shows the References dialog box with a reference set to the
> Internet Explorer object library. The proper reference is described in th=
e
> dialog box as "Microsoft Internet Controls." "

0
AB
3/25/2010 3:12:03 PM
Yes I found the "Microsoft Browser Helper" and now it compiles correctly. 
But now I am getting this error: "Object variable or With block variable not 
set (Error 91)" upon executing: .getElementById("lblSelectReport").Value = 762

Do you know what this may be? . . .

0
Utf
3/25/2010 4:12:07 PM
It means that it's unable to get the lblSelectReport element from the
HTML.
Try replacing it (lblSelectReport) with:
selSavedReports

It's that i'm trying to guess which element exactly from the HTML
holds the valu of the report you want to run. Without having access to
the exact working website it's almost hit&miss.

Also, depending on the design of the web page it might not be yet
loaded before the vba tries to grab the element (i.e., this
        'wait until IE finished loading the page
        Do Until Not ie.Busy And ie.ReadyState =3D 4
            DoEvents
        Loop

might still not determine precisely if the web page has actually
loaded completely.
To check this put 'Stop' before this
 Set varHtml =3D ie.Document
in the vba code, so it would look something like this:
......
    End With

    Stop ' This will halt your vba code here so that you could
manually chekc if the Internet Explorer actually _
             has loaded completely. Then to proceed hit either F5 to
run the whole code or F8 to step it through step by step.
    Set varHtml =3D ie.Document


    With varHtml
.........



On Mar 25, 4:12=A0pm, MartinL <Mart...@discussions.microsoft.com> wrote:
> Yes I found the "Microsoft Browser Helper" and now it compiles correctly.
> But now I am getting this error: "Object variable or With block variable =
not
> set (Error 91)" upon executing: .getElementById("lblSelectReport").Value =
=3D 762
>
> Do you know what this may be? . . .

0
AB
3/25/2010 4:51:20 PM
one you get past the 'select report' thing you might get similar
compile error on the date selection, if so - try replacing that one
lblInitiateDt
with
txtInitiateDtFrom

It seems that your web developer used the 'lbl' to specify LABELS and
TXT to specify text fields and SEL to specify select fields (which
makes sense) - error in my initial code was that i was trying to set a
value of a label (lblSe...) which can't be done. The same applies to
the date field - i was trying to set a value to lblIn... (a label) -
therefore try the txtInitiateDtFrom.
The same might apply to the DateTo (tha'ts not in my code at all yet)
- for that one the id seems to be:
txtInitiateDtTo

AB.

On Mar 25, 4:51=A0pm, AB <austris.bahanovs...@gmail.com> wrote:
> It means that it's unable to get the lblSelectReport element from the
> HTML.
> Try replacing it (lblSelectReport) with:
> selSavedReports
>
> It's that i'm trying to guess which element exactly from the HTML
> holds the valu of the report you want to run. Without having access to
> the exact working website it's almost hit&miss.
>
> Also, depending on the design of the web page it might not be yet
> loaded before the vba tries to grab the element (i.e., this
> =A0 =A0 =A0 =A0 'wait until IE finished loading the page
> =A0 =A0 =A0 =A0 Do Until Not ie.Busy And ie.ReadyState =3D 4
> =A0 =A0 =A0 =A0 =A0 =A0 DoEvents
> =A0 =A0 =A0 =A0 Loop
>
> might still not determine precisely if the web page has actually
> loaded completely.
> To check this put 'Stop' before this
> =A0Set varHtml =3D ie.Document
> in the vba code, so it would look something like this:
> .....
> =A0 =A0 End With
>
> =A0 =A0 Stop ' This will halt your vba code here so that you could
> manually chekc if the Internet Explorer actually _
> =A0 =A0 =A0 =A0 =A0 =A0 =A0has loaded completely. Then to proceed hit eit=
her F5 to
> run the whole code or F8 to step it through step by step.
> =A0 =A0 Set varHtml =3D ie.Document
>
> =A0 =A0 With varHtml
> ........
>
> On Mar 25, 4:12=A0pm, MartinL <Mart...@discussions.microsoft.com> wrote:
>
>
>
> > Yes I found the "Microsoft Browser Helper" and now it compiles correctl=
y.
> > But now I am getting this error: "Object variable or With block variabl=
e not
> > set (Error 91)" upon executing: .getElementById("lblSelectReport").Valu=
e =3D 762
>
> > Do you know what this may be? . . .- Hide quoted text -
>
> - Show quoted text -

0
AB
3/25/2010 5:09:24 PM

"AB" wrote:

> one you get past the 'select report' thing you might get similar
> compile error on the date selection, if so - try replacing that one
> lblInitiateDt
> with
> txtInitiateDtFrom
> 
> It seems that your web developer used the 'lbl' to specify LABELS and
> TXT to specify text fields and SEL to specify select fields (which
> makes sense) - error in my initial code was that i was trying to set a
> value of a label (lblSe...) which can't be done. The same applies to
> the date field - i was trying to set a value to lblIn... (a label) -
> therefore try the txtInitiateDtFrom.
> The same might apply to the DateTo (tha'ts not in my code at all yet)
> - for that one the id seems to be:
> txtInitiateDtTo
> 
> AB.

I realy appreciate the time you are taking to help me out on this, but I 
can't seem to get past the "lblSelectReport",. Question: So if I take away 
the "lbl" part it should work? . . . because I tried and it doesn't . ..   
maybe it would help if I emailed you the complete source code and it could 
save some time. . .  please let me know and thanks once again.

I tried it these 3 ways, I change to 932 because that's the report I really 
need. But they all send the same error message: Run-time error 91

..getElementById("lblSelectReport").Value = 932
..getElementById("SelectReport").Value = 932
..getElementById("SelectReport").Value = 932

0
Utf
3/25/2010 9:36:01 PM
No worries - that's what people are here for! I just hope i'll be able
to help.

try this (from your post i gather you didn't try the one that starts
with 'sel'):

..getElementById("selSavedReports").Value =3D 932


The 'lblSelectReport' was completely wrong element in the html - my
bad - i picked a lable element instead of an element that can actually
be changed (like text box or select drop down etc.) - taking away par
to element's name would just mean that code won't be able to find it.
The reference to 'lbl' was just me trying to explain how to see those
elements in the html by yourself.

Try putting (before the line that fires error) this:
msgbox "I managed to read the label. It says: "
& .getElementById("lblSelectReport").InnerText
or this:
msgbox "I managed to read the label. It says: "
& .getElementById("lblSelectReport").InnerHtml

If this message fires and it has read the label text then that would
demonstrate how the vba code can read the elements.

Post back how you get on.

> I realy appreciate the time you are taking to help me out on this, but I
> can't seem to get past the "lblSelectReport",. Question: So if I take awa=
y
> the "lbl" part it should work? . . . because I tried and it doesn't . .. =
=A0
> maybe it would help if I emailed you the complete source code and it coul=
d
> save some time. . . =A0please let me know and thanks once again.
>
> I tried it these 3 ways, I change to 932 because that's the report I real=
ly
> need. But they all send the same error message: Run-time error 91
>
> .getElementById("lblSelectReport").Value =3D 932
> .getElementById("SelectReport").Value =3D 932
> .getElementById("SelectReport").Value =3D 932

0
AB
3/25/2010 9:57:24 PM
> Try putting (before the line that fires error) this:
> msgbox "I managed to read the label. It says: "
> & .getElementById("lblSelectReport").InnerText
> or this:
> msgbox "I managed to read the label. It says: "
> & .getElementById("lblSelectReport").InnerHtml
> 
> If this message fires and it has read the label text then that would
> demonstrate how the vba code can read the elements.
> 
I tried including the msgbox both ways but I keep getting the same error. 
I'm cincluding the complete code just in case I'm missing something else:

Sub Test()
'references to: _
(1) shdocvw (Microsoft Internet Controls) _
(2) mshtml (Microsoft HTML Object Library)


Dim ie As SHDocVw.InternetExplorer
Dim varHtml As MSHTML.HTMLDocument

Set ie = New SHDocVw.InternetExplorer

With ie
..Visible = True
..Navigate2 "http://webha.kenmex.paccar.com/edc/default.aspx"

Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop

End With

'Stop

Set varHtml = ie.Document

With varHtml
'MsgBox "I managed to read the label. It says: " _
& .getElementById("lblSelectReport").innerText

MsgBox "I managed to read the label. It says: " _
& .getElementById("lblSelectReport").innerHTML


..getElementById("selSavedReports").Value = 932
'.getElementById("selSelectReport").Value = 932
'.getElementById("lblManageReports").Value = 932

..getElementById("lblInitiateDt").Value = Format(Now, "mm-dd-yyyy") 
..getElementById("btnSubmit").Click 

'wait until IE finished loading the page
Do Until Not ie.Busy And ie.ReadyState = 4
DoEvents
Loop
End With

End Sub


0
Utf
3/25/2010 10:54:01 PM
I'm also including the first few lines of the source code of the web page. 
Maybe there's something there that could give you a clue. . . . 


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title id="htmTitle">Defect List Report</title>
		<base target="_self">		
		<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" 
content="http://schemas.microsoft.com/intellisense/ie5">
		<LINK href="/defaultscreen.css" type="text/css" rel="stylesheet">
		<script language="javascript">
		//**************************************************************
		//Pop up window when Submit button is click
		//**************************************************************
		//
		function UnloadWin(){
		}

0
Utf
3/26/2010 12:17:03 AM
If you comment out the msgbox does this:

..getElementById("selSavedReports").Value = 932

still fire the run-time error?
0
AB
3/26/2010 9:45:30 AM
if this:

> If you comment out the msgbox does this:
>
> .getElementById("selSavedReports").Value = 932
>
> still fire the run-time error?

still doesn't work and because i'm running out of ideas where i'm
getting it wrong - i thought i'd demonstrate how the whole automate-ie-
from-vba thing works on a web site that we both should have access to
- www.yahoo.com and hopefully it would help you fix the code and see
what's wrong with it as i currently struggle to figure that out.

So, this is pretty much the same code as for your site (the structure
and principles) just it's a public url.

Sub Test()

    'Check this out: http://www.mrexcel.com/forum/showthread.php?t=302438

    Dim ie As SHDocVw.InternetExplorer
    Dim varHTML As MSHTML.HTMLDocument

    Set ie = New SHDocVw.InternetExplorer
    With ie
        .Visible = True
        .Navigate "www.yahoo.com" 'Check out Yahoo site

        'wait until IE finished loading the page
        Do Until Not ie.Busy And ie.ReadyState = 4
            DoEvents
        Loop

    End With

    Set varHTML = ie.Document

    With varHTML

        .getElementById("p_13838465-p").Value = "aaa" 'Yahoo has coded
the search box _
                to have an ID of 'p_13838465-p' - so grab it and set
its value to aaa
        MsgBox "Check out the Browser - it should be on Yahoo and the
search box " _
            & "should say 'aaa'" & vbCrLf & "Click OK only once you've
checked!", vbOKOnly

        .getElementsByName("p").Item.Value = "bbb" 'The exact saem
element (yahoo search _
                box) has not only ID of p_13838465-p but also a name
of "p" - so, you _
                can refference the element not only by ID but also by
its name. So this _
                one changes the search box to bbb

        MsgBox "This time the search box " _
            & "should say 'bbb'" & vbCrLf & "Click OK only once you've
checked!", vbOKOnly

        .getElementById("search-submit").Click 'The yahoo page
'Search' button has id of _
                'search-submit' and so you can get the element by the
id and click on it _
                that's what this line of code does.

        'wait until IE finished loading the page
        Do Until Not ie.Busy And ie.ReadyState = 4
            DoEvents
        Loop

        MsgBox "Check out the Browser - now it should have searched
for " _
            & "'bbb'", vbOKOnly

    End With

End Sub
0
AB
3/26/2010 10:14:20 AM
Yes it does.

I was reading something about the .getElementById function that said that it 
could be in conflict with another defined function with the same name, in 
some other library, coul it be that? . . or could I redefine this function in 
another way? . . .
0
Utf
3/26/2010 3:27:01 PM

"AB" wrote:

> if this:
> 
> > If you comment out the msgbox does this:
> >
> > .getElementById("selSavedReports").Value = 932
> >
> > still fire the run-time error?
> 
> still doesn't work and because i'm running out of ideas where i'm
> getting it wrong - i thought i'd demonstrate how the whole automate-ie-
> from-vba thing works on a web site that we both should have access to
> - www.yahoo.com and hopefully it would help you fix the code and see
> what's wrong with it as i currently struggle to figure that out.
> 
> So, this is pretty much the same code as for your site (the structure
> and principles) just it's a public url.
> 
> Sub Test()
> 
>     'Check this out: http://www.mrexcel.com/forum/showthread.php?t=302438
> 
>     Dim ie As SHDocVw.InternetExplorer
>     Dim varHTML As MSHTML.HTMLDocument
> 
>     Set ie = New SHDocVw.InternetExplorer
>     With ie
>         .Visible = True
>         .Navigate "www.yahoo.com" 'Check out Yahoo site
> 
>         'wait until IE finished loading the page
>         Do Until Not ie.Busy And ie.ReadyState = 4
>             DoEvents
>         Loop
> 
>     End With
> 
>     Set varHTML = ie.Document
> 
>     With varHTML
> 
>         .getElementById("p_13838465-p").Value = "aaa" 'Yahoo has coded
> the search box _
>                 to have an ID of 'p_13838465-p' - so grab it and set
> its value to aaa
>         MsgBox "Check out the Browser - it should be on Yahoo and the
> search box " _
>             & "should say 'aaa'" & vbCrLf & "Click OK only once you've
> checked!", vbOKOnly
> 
>         .getElementsByName("p").Item.Value = "bbb" 'The exact saem
> element (yahoo search _
>                 box) has not only ID of p_13838465-p but also a name
> of "p" - so, you _
>                 can refference the element not only by ID but also by
> its name. So this _
>                 one changes the search box to bbb
> 
>         MsgBox "This time the search box " _
>             & "should say 'bbb'" & vbCrLf & "Click OK only once you've
> checked!", vbOKOnly
> 
>         .getElementById("search-submit").Click 'The yahoo page
> 'Search' button has id of _
>                 'search-submit' and so you can get the element by the
> id and click on it _
>                 that's what this line of code does.
> 
>         'wait until IE finished loading the page
>         Do Until Not ie.Busy And ie.ReadyState = 4
>             DoEvents
>         Loop
> 
>         MsgBox "Check out the Browser - now it should have searched
> for " _
>             & "'bbb'", vbOKOnly
> 
>     End With
> 
> End Sub
> .
> 
I will have to try the Yahoo example at home, because I only have limited 
internet access here at work. I was thinking that maybe it could be a 
security issue because this is an internal company web site that may somehow 
restrict this kind of access from VBA.
0
Utf
3/26/2010 3:49:01 PM
I've never had that before but it doesn't mean that It's not the
problem.
Try out the Yahoo sample at home - this should give you a good
understading how it works (well, you should finally see that it
actually does work :)).

One more suggestion, though, - maybe still try at the office this

..getElementById("selSavedReports").Value =3D 763'I know it's not the
report you want but the first option looks somehat _
                                unconvincing to me in the source code.

or maybe even this:

..getElementById("selSavedReports").Value =3D "763"'ie. string instead of
Long

as the goal at this point is just to finally get any element changed
by vba on that site of yours.


On Mar 26, 3:27=A0pm, MartinL <Mart...@discussions.microsoft.com> wrote:
> Yes it does.
>
> I was reading something about the .getElementById function that said that=
 it
> could be in conflict with another defined function with the same name, in
> some other library, coul it be that? . . or could I redefine this functio=
n in
> another way? . . .

0
AB
3/26/2010 5:01:44 PM
AB I will try this and let you know how it went, I'm pretty sure it's may be 
something related to security, this is pretty straight forward.

..getElementById("selSavedReports").Value = 763
 
..getElementById("selSavedReports").Value = "763"

I tried both but still got the same message,  sorry. 
0
Utf
3/26/2010 10:25:01 PM

"AB" wrote:

> if this:
> 
> > If you comment out the msgbox does this:
> >
> > .getElementById("selSavedReports").Value = 932
> >
> > still fire the run-time error?
> 
> still doesn't work and because i'm running out of ideas where i'm
> getting it wrong - i thought i'd demonstrate how the whole automate-ie-
> from-vba thing works on a web site that we both should have access to
> - www.yahoo.com and hopefully it would help you fix the code and see
> what's wrong with it as i currently struggle to figure that out.
> 
> So, this is pretty much the same code as for your site (the structure
> and principles) just it's a public url.
> 
> Sub Test()
> 
>     'Check this out: http://www.mrexcel.com/forum/showthread.php?t=302438
> 
>     Dim ie As SHDocVw.InternetExplorer
>     Dim varHTML As MSHTML.HTMLDocument
> 
>     Set ie = New SHDocVw.InternetExplorer
>     With ie
>         .Visible = True
>         .Navigate "www.yahoo.com" 'Check out Yahoo site
> 
>         'wait until IE finished loading the page
>         Do Until Not ie.Busy And ie.ReadyState = 4
>             DoEvents
>         Loop
> 
>     End With
> 
>     Set varHTML = ie.Document
> 
>     With varHTML
> 
>         .getElementById("p_13838465-p").Value = "aaa" 'Yahoo has coded
> the search box _
>                 to have an ID of 'p_13838465-p' - so grab it and set
> its value to aaa
>         MsgBox "Check out the Browser - it should be on Yahoo and the
> search box " _
>             & "should say 'aaa'" & vbCrLf & "Click OK only once you've
> checked!", vbOKOnly
> 
>         .getElementsByName("p").Item.Value = "bbb" 'The exact saem
> element (yahoo search _
>                 box) has not only ID of p_13838465-p but also a name
> of "p" - so, you _
>                 can refference the element not only by ID but also by
> its name. So this _
>                 one changes the search box to bbb
> 
>         MsgBox "This time the search box " _
>             & "should say 'bbb'" & vbCrLf & "Click OK only once you've
> checked!", vbOKOnly
> 
>         .getElementById("search-submit").Click 'The yahoo page
> 'Search' button has id of _
>                 'search-submit' and so you can get the element by the
> id and click on it _
>                 that's what this line of code does.
> 
>         'wait until IE finished loading the page
>         Do Until Not ie.Busy And ie.ReadyState = 4
>             DoEvents
>         Loop
> 
>         MsgBox "Check out the Browser - now it should have searched
> for " _
>             & "'bbb'", vbOKOnly
> 
>     End With
> 
> End Sub
> .
> 
0
Utf
3/27/2010 10:20:03 PM
Tried this at home, it works perfectly!!!!! why doesn't it work at work??


0
Utf
3/27/2010 10:25:01 PM
Sorry Martin, it seems that I didn't manage to help you after all -
I've been automating ie only for last couple of months myself and so
i've run out of suggestions.
The only last bit up my sleeve - I've had it myself when IE was always
creating a new instance whenever i .navigate to a specific URL,
meaning - when the code runs and creates the IE object, makes it
visible - i've got 1 IE window on my screen but then I .navigate the
the site i needed and that IE was (for some reason) creating new
window for that site and obviously my code wasn't controlling the new
window (but only the old)  and therefore code couldn't find the
elements i wanted it to change (as the old window didn't pull the web
site - the new did). It was IE7 - so what I ended up doing was
installed IE8 and it did the trick (it stopped creating the new
windows).
There is a method to catch the .newwindow or something like that in
the shdoc - you can try googling for it.
So, this seems to be the last thing i had that could be it (i.e.,
maybe your ie also was creating another window) but if not - i'm
afraid you'll need to open up another thread or ask someone else.
I hope you make it work!

A.


On Mar 27, 11:25=A0pm, MartinL <Mart...@discussions.microsoft.com>
wrote:
> Tried this at home, it works perfectly!!!!! why doesn't it work at work??

0
AB
3/28/2010 2:25:11 PM
I appreciate your time in helping, I will re-post.

Thanks!


0
Utf
3/28/2010 8:09:01 PM
Reply:

Similar Artilces:

Auto-print Pivot Table Report that cycles through all Page Field values...
Suppose I have a pivot report with a Page Field. In my case, it allows a drilled-down view for a given state using source data covering all states. Pretty common use case, I imagine. I'd like to be able to have excel print a multi-page report for all states (not together, but individually). It should just cycle through all values of the page-field value. This seems like a pretty basic thing to want to do with a pivot table but so far I don't see that it's possible. I mean, sheesh, they even called it the "page field" as if it's supposed to be part of a multi-pag...

CRM 1.0 Crystal Print report error
Hi I am trying to use the builtin crystal reports and every report is coming back with the below error any advice on how to solved this? Regards J Error encountered by Crystal PageServer ---------------------------------------------------------------------------- ---- The error message returned is: Error detected by database DLL. [On Cache/Page Server: CRMSERVER.pageserver] You may need to restart your Crystal Services on your application server: You can accomplish this via the following stepsL 1. Click Start, point to Programs, point to Crystal Enterprise, and click Crystal Con...

How to create a "SO on hold" report in SmartList?
Hi, I tried both (GP -> SmartList -> Sales Transactions) and (GP -> SmartList -> Sales Line Items) and add "SO Number" and "Hold" two columns into the report. We do have lots of SO are on hold, but in the "Hold" column it shows "no" for all SOs. Can anyone show me how to create a "SO on hold" report in the SmartList? Thank you very much. stien You wont find this in Smartlist unless you have Smartlist Builder. You need to report agains the SOP10104 Table, the Sakes Process Holds Work and History table. This table contains...

Publisher 98 Web Page Building
I am in Year 9 at school, and my class were set the task of making a single Web page about quite a famous author and playwright called R. C. Sherriff (he wrote Journey's End - a play about trench life in World War One - which was a West End hit). The computers in our I.T. Department currently run Microsoft Windows NT 4.0 with various service packs and updates. The system setup is quite common to the West Midlands schools, specifically those in the Telford & Wrekin area of the UK. Anyway, each computer has a preloaded version of Office 97 and Publisher 98. I am quite experienced with ...

How do I copy pages so that formats also arrive at the destinatio
Whenever I copy a worksheet to a new page, I have to reset the column widths, Bold selections, alignments, etc. How do I copy so that the non-text material appears at the destination? "Paste special" doesn't help. Thanks Peg Hi Peg, Why does PasteSpecial not help?? Seems it has everything you're asking for. :? -- Regards, Zack Barresse, aka firefytr, (GT = TFS FF Zack) To email, remove the NO SPAM. Please keep correspondence to the board, as to benefit others. "Peg" <Peg@discussions.microsoft.com> wrote in message news:DC00EE5B-02A6-445A-97CC...

Excel combo box
Is there an easy way to maintain a date format from the original cell through selection via a combo box? --- Message posted from http://www.ExcelForum.com/ If you add the items yourself--instead of using listfillrange, then the combobox from the control toolbox toolbar will keep the formatting: Option Explicit Private Sub Worksheet_Activate() Dim myCell As Range With Me.ComboBox1 .ListFillRange = "" .Clear For Each myCell In Me.Range("a1:a14").Cells .AddItem myCell.Text Next myCell End With End Sub or if you want...

Need only one DLL instance to run...
Hi all, 1: if two apps load the same DLL - LoadLibrary(...) - system will create to different instance of the DLL... Now, in my DLL i've a CList and i need it to be visible to all instance and all apps!!!! Is there a way!? 2: I need the dll to remain loaded till machine reboot!!! Is it possible!? Thanks Ale >if two apps load the same DLL - LoadLibrary(...) - system will create to >different instance of the DLL... >Now, in my DLL i've a CList and i need it to be visible to all instance and >all apps!!!! > >Is there a way!? It'll be difficult to share a ...

this web site throwing blank pages
anyone else noting that this web site is throwing alot of unreachable web pages suddenly? Right now all my received email notifications of a reply ...the link on that email does not work to the reply.... Also alot of times during the sign-in it goes to nowhere.... -- NTC Yes, the sign-in always breaks/fails half way in and you need to reload to complete the process if using the Web interface. -- Daniel Pineault "NetworkTrade" wrote: > anyone else noting that this web site is throwing alot of unreachable web > pages suddenly? > > Right now all my receive...

Importing Statements #4
I currently download statements from my bank to Money 2007 as my bank no longer supports direct downloading. The problem is that I have multiple accounts and a few accounts are downloading to the wroing acocunt in money. How can I change the account that the downloaded data goes to? In microsoft.public.money, dsirjuesingh wrote: >I currently download statements from my bank to Money 2007 as my bank no >longer supports direct downloading. >The problem is that I have multiple accounts and a few accounts are >downloading to the wroing acocunt in money. >How can I change the a...

Word Mail Merge with Excel as data file
Word 2003 Excel 2003 Windows XP Why would a mail merge show only every other Excel row when merging with a Microsoft Word form? I am also cross-referening this to the Word forum. Thanks in advance! Sounds like perhaps you have TWO <<next record>> fields in your main document for each, and you should only have one. ******************* ~Anne Troy www.OfficeArticles.com "HT" <asfafd@microsoft.com> wrote in message news:OER87r9hFHA.3260@TK2MSFTNGP10.phx.gbl... > Word 2003 > Excel 2003 > Windows XP > > Why would a mail merge show only every othe...

credentials to run this report are not stored
Hi all, I'm getting this problem when I try and create a timed subscription. Error: ...credentials to run this report are not stored..... ok I created another folder under the same folder where I'm having this problem. loaded the report and I have no problem. I even moved the current folder with that report in it. Creted another folder with the same name and still the same problem with that named folder. With a different name for the folder I have no problem??? I'm stuck here.. almost all post just talk about storing the credentials, Already done and works...

Excel Validation Drop Down Box
Is there any way to increase the size of the text in the validation drop down box? If the sheet is zoomed to say 60% the text in the box is not readable. No, but you may find this helpful: http://www.contextures.com/xlDataVal08.html#Larger In article <0a4c01c3999c$92878a10$a001280a@phx.gbl>, "Mike S." <anonymous@discussions.microsoft.com> wrote: > Is there any way to increase the size of the text in the > validation drop down box? If the sheet is zoomed to say > 60% the text in the box is not readable. ...

run time error 10-22-03
I am having a lot of trouble when I open up word I get run time error 52 in VB. I have tried uninstalling word and reinstalling it. WE have tried deleting the macro but still to no avail can someone help me please? ...

Repost: Error running Report in an Access 2003 db from Access 2007
Ok, clarification - ignore the code from my original post, some of the reports do work. The ones that don't are reports that I have being filtered. Here is the code from one of those buttons: Private Sub Ok_Click() On Error GoTo Ok_Click_Err 'using the customer sub form for customer state report to filter the report, clicking ok will open report for selected state Dim stDocName As String Dim stLinkCriteria As String If Not IsNull(Me.Search_Results) Then stLinkCriteria = "[StateOrProvince] = """ & Me![Search Results] & """"...

Automatically run macro
My name is Mike and i have a question about microsoft excel macro's. Attached is a copy of the excel sheet im working on. Below the excel sheet is the macro I built. Some of the cells contain given values and some cells are calculated from formulas. Cell (G4) is my given value...it is related to cell (C32). The point is, I plug a value into cell (C10) and it runs through the rest of the calcs in the other cells and gives me a value to cell (C32). I built a macro that works as a goal seek pretty much. The macro makes cell (C32) equal to cell (G4) and gives me the value for cell (C10). I wan...

tables created by Linking an Excel File
Hi Mates I have a linked access table created from an excel spreadsheet. Then I used Table Analyze feature in access to split this and the split created 3 seperate tables. When the excel spreadsheet is changed the linked table gets updated but split tables remains unchanged. Is there a way these split tables to get updated automatically. Thanks mates in advance for your help. Sarah W Hi Sarah, The table analyzer is designed for splitting a non-normalised table into two or more new, normalised tables. This is a one-time process: the new tables are entirely separate from the old one. T...

Excel Continuous Running Total
I posted a message earlier and have received a partial solution. I want to keep track of how much stock prices go up or down with a running total of how much they go up or down over several days until the direction changes. For example, if price go up 10 on Mon, 20 on Tues, 30 on Thurs and down 10 on Fri I want my running total column to show a positive number of 60 and then a red number of 10 and continue adding the amount of the total of the down days until the market shows an up day. The formula I am now using total the first and second day but does not do a running total count if t...

FRx report #2
Hi, I have an Income Statement in FRx which is restricted in the row format to pull a specific department and also uses account filters with the same restriction in the column format. I now have to modify that report to include a new department that just got created. In the column format, I included a separate column in the Month-to-date and YTD sections with the account filters restricted to that department. The problem with the report is that it doesn't tie with the GL trial balance. I'm not sure what the problem is but I'm guessing is with the row format. I would appreciate any...

display changing label caption on form as sub runs w/o screen flic
let's say i have this routine Sub Test label1.caption = "Starting ... " 'do events label1.caption = "Getting there ... " 'do events label1.caption = "Finished! ... " End Sub on my form, i have label1 right in the middle what happens is sometimes the message will change, and then sometimes it wont, or it will show the first one, skip the second and jump to the third etc etc etc so it is inconsistent. is there a way to make sure the label caption displays consistently, on time, wh...

Saving reports as a .pdf or .rpt file.
Hello: Can someone please tell me how I can save my Excel reports as a .pdf or .rpt file, if this is possible? Your help is greatly appreciated. Regards, Dinesh. Dinesh, Not sure about .rpt files, but to save as a pdf you need to own the full version of acrobat (not just the reader). Then you can print to pdf. Dan E "Dinesh" <needhelp@needhelp.com> wrote in message news:0b4401c381eb$aea173a0$a001280a@phx.gbl... > Hello: > > Can someone please tell me how I can save my Excel reports > as a .pdf or .rpt file, if this is possible? Your help is > greatly...

Money 2002 will not run
I had been using Money 2002 for approx. 3 yrs on my home pc (Dell Dim 2100, XP Home Ed. w/SP2). Last year, it simply would not launch. No error message, no splash screen, no app opening, no process listed in Task Manager. Just.... nothing.... The only change that was made to the system since M2k2 last ran was upgrading my a/v solution from Trend Micro PC-Cillin to TM Internet Security. I have tried disabling every aspect of the Internet Security product, as well as completely un-installing the app, and then attempting to run Money, but the same thing (nothing) happens. I was considerin...

Access 2007 Layout View for reports upgraded from Access 2003
I notice that in Access 2007 only those reports newly created in Access 2007 appear to have access to Layout View. In an ACCDB that had been converted from an Access 2003 MDB the reports that had originally been created in Access 2003 do not have access to this feature. Any attempt to do so is met with a "Layout view is unavailable for this Report." message. Is there any way, short of recreating the report and manually copying over its controls and code, to upgrade such reports so that Layout View is accessible? Hi Benjamin, 1. Open the report in design view 2. Open the property s...

How to Import files from Outlook Express 6 to Outlook2003
I am trying to import my .pst files(in Outlook Express 6 into Outlook 2003. Is this possible.... whats the best way to do it? Thanks SJ >-----Original Message----- >I am trying to import my .pst files(in Outlook Express 6 >into Outlook 2003. Is this possible.... whats the best >way to do it? > >Thanks > >SJ >. > If You are using Outlook 2003 GO TO TOOLS --> Accounts -- > View Change Accounts Click on New Outlook Data File and add your PST there. In article <081f01c3c4ce$2eba1540$a001280a@phx.gbl>, anonymous@discussions.microsoft.com says....

Excel Invoice #2
How do you transfer data, such as name, address, date, hours, charge per hour, and total charge, from an Excel spreadsheet to an Excel invoice without copying and pasting? Hi, Ann. Try something like this: http://www.officearticles.com/tutorials/order_form_or_invoice_form_in_microsoft_excel.htm Pay particular attention to the link in the 2nd bullet. ************ Anne Troy www.OfficeArticles.com "Ann" <Ann@discussions.microsoft.com> wrote in message news:1951D37F-6385-41CC-A33A-A0A28AAA4875@microsoft.com... > How do you transfer data, such as name, address, date, hours...

Re: Workflow just wont run automatically, i have to run them manually
Yes, but i realized what i was doing wrong. I assumed [bad idea] that if i create a case and hit Save & Close the first time, taht the rule will run. In order for the rule to run automatically, it has to be Save, once it saves it, then Save & Close. Thanks for your reply. "Hi, Did you check the workflow monitor to see if the rules get triggered correctly and complete sucessfully ? Have a nice day, St=E9phane Dorrekens " --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://...