Eric Penfold
Active Member
- Joined
- Nov 19, 2021
- Messages
- 431
- Office Version
- 365
- Platform
- Windows
- Mobile
This code open the webpage but i would like it to copy an area paste to work sheet in the correct range.
How is this done?
How is this done?
VBA Code:
Option Explicit
Sub Weather_Update()
Dim wb As Workbook
Dim ws As Worksheet
Dim url As String
Dim IE As Object
Dim LRow As Long
Dim item As Picture
Set wb = Workbooks("MyPersonal.xlsb")
Set ws = wb.Worksheets("DailyMail")
Set IE = CreateObject("InternetExplorer.Application")
If ActiveCell = "ALTON" Then
url = "https://www.bbc.co.uk/weather/2657408"
ElseIf ActiveCell = "BASILDON" Then
url = "https://www.bbc.co.uk/weather/2656194"
ElseIf ActiveCell = "COVENTRY" Then
url = "https://www.bbc.co.uk/weather/2652221"
End If
IE.Visible = True
IE.Navigate (url)
End Sub