I’m using this web scraping VBA code in Excel 2010 to pull the title off of web pages. I want it to paste the title as values after the code has run.
Here’s my code:
Function GetTitleFromURL(sURL As String)
Dim wb As Object
Dim doc As Object
Set wb = CreateObject("InternetExplorer.Application")
wb.Navigate sURL
While wb.Busy
DoEvents
Wend
GetTitleFromURL = wb.Document.Title
wb.Quit
Set wb = Nothing
'trying to paste as value after get title
'Application.CutCopyMode = False
' Selection.Copy
' Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
' :=False, Transpose:=False
End Function
Thanks for your help!
Maybe something like this may be suitable?