controlling IE using vba from within a worksheet additional info

EDUCATED MONKEY

Board Regular
Joined
Jul 17, 2011
Messages
218
Sorry that I have opened another thread I could not find how to append the original one, maybe some one could tell me how to append the original for next time also is the a way to say that you have received an answer that works and you no longer need help with that item?<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
XP Professional office XP 2003 IE 8 <o:p></o:p>
<o:p></o:p>
<o:p></o:p>
Further to my request made earlier, “controlling IE using vba from within a worksheet”<o:p></o:p>
<o:p></o:p>
having done some more research I have managed to cover the first part of opening the Internet Explorer from the sheet, <o:p></o:p>
can some one tell me how I go about selecting ALL and Copy the open page and closing the page after use?, during the experiment I found that I had opened most of the pages relating to the urls in the list as it proceeded down the list, I had thought as I open a new page the old one closed but not so, therefore the action required is open get content and close move down the list load next page <o:p></o:p>
<o:p></o:p>
So the parts I need help or pointers on are these<o:p></o:p>
<o:p></o:p>
1 Selecting the open page, by mimicking the control A action from the keyboard <o:p></o:p>
<o:p></o:p>
2 Once the open page has been selected I need to mimicking the control C action from the keyboard <o:p></o:p>
<o:p></o:p>
3 Once the contents of the selected page have been dropped into column A the IE window needs to be closed, mimicking click the close cross top right of open page <o:p></o:p>
Code:
Sub genurl()
'
' genurl Macro
' Macro recorded 06/08/2011 by Peter Hayward
'
' Keyboard Shortcut: Ctrl+f
'
Dim n As Integer
Dim m As Long
Dim q As Integer
Dim aurl As String
 Dim EXP
 
                          Sheets("AURL").Select
                                  q = Worksheets("AURL").Range("D1").Value ' get how many urls their are left
                                      n = 94 'total number of urls on sheet
                                         m = n - q + 1 ' prepair to move down the column
 
 
                           Worksheets("AURL").Cells(m, 1).Activate
                                  aurl = ActiveCell.Value
                                         q = q - 1  ' move down the list
                                           Worksheets("AURL").Range("D1").Value = q ' store position in list
 
 
                             Set EXP = CreateObject("InternetExplorer.application")
                                         EXP.Visible = True
                                          aurl = Worksheets("AURL").Range("I1").Value  ' get the current  url
                                                EXP.Navigate (aurl)       'cell I1 is where the url is construction by
                                                          ' CONCATENATE the body of the url and the vairable part from the list
End Sub
 
Last edited:

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

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