Hi all, i have an error which i can't seem to fix.
I have a module which contains the following code. I am struggling with the procedure CopyData(). It works when the sheet "Raw Data" is active, however, when it is not, i receive the error on the green line highlighted in the code. Making the "Raw Data" sheet active is not an option as i need to work in other sheets whilst this procedure is been called.
Does anyone have any suggestions please
I have a module which contains the following code. I am struggling with the procedure CopyData(). It works when the sheet "Raw Data" is active, however, when it is not, i receive the error on the green line highlighted in the code. Making the "Raw Data" sheet active is not an option as i need to work in other sheets whilst this procedure is been called.
Does anyone have any suggestions please
Code:
Sub RefreshURL_Click()link_name = Sheets("Raw Data").Range("F2")
Call Sheets("Raw Data").WebBrowser1.Navigate(link_name)
End Sub
Sub CopyData()
Sheets("Raw Data").WebBrowser1.Refresh
Sheets("Raw Data").WebBrowser1.Copy
[COLOR=#008000]Sheets("Raw Data").Range("E34").Value = Sheets("Raw Data").WebBrowser1.Document.Body.InnerText[/COLOR]
End Sub