Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm fairly new to Vba and have written some code that will open IE and allow
me to navigate to my chosen file. (I cannot use WebQuery to retrieve the data as it fails to identify any there.) Manual Copy and paste does the trick but I'm seeking to automate the process. Can anyone advise me how to instruct IE to 'select all', 'copy' and then paste it into my workbook on the sheet named 'Hands'. Sub ListLinks() Dim IeApp As InternetExplorer Dim sURL As String Dim IeDoc As Object Dim MyURL As String ' I need this to be variable/ user defined MyURL = Application.GetOpenFilename() Set IeApp = New InternetExplorer 'Make it visible IeApp.Visible = True 'define the page to open sURL = MyURL 'navigate to the page IeApp.navigate sURL 'Pause the macro using a loop until the 'page is fully loaded Do Loop Until IeApp.readyState = READYSTATE_COMPLETE Code needed here to copy and paste entire web page Worksheets("Hands").Activate Range("A1").Select ActiveSheet.Paste 'Clean up Set IeApp = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy, paste without file name referenced after paste | Excel Discussion (Misc queries) | |||
How can I allow only copy of a file not cut and paste? | Excel Discussion (Misc queries) | |||
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro | Excel Programming | |||
copy/paste from one file to another without file name reference | Excel Discussion (Misc queries) |