Hi, I want a macro to open a webpage, select all of the page, copy and paste the raw data in Excel.
I have this using Chrome but it doesn't work. I don't mind changing to MS Edge if necessary. Thanks
I have this using Chrome but it doesn't work. I don't mind changing to MS Edge if necessary. Thanks
VBA Code:
Sub Test()
Dim ChromeLocation As String
Dim MyURL As String
ChromeLocation = "C:\Program Files\Google\Chrome\Application\chrome.exe"
MyURL = "https://google.com"
Shell (ChromeLocation & " -url -newtab " & MyURL)
Cells.Select ''''fail from here
Selection.Copy
Cells("E1").PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
End Sub