Reputation: 185
I have an Excel (2010) report, which is linked to a database. When I hit refresh, I enter in a unique 8 digit number, and it will bring up a bunch of data. The unique number I enter is also returned and displayed in column S (from row 3 downwards).
I also use a web page on our intranet where I can enter the same unique number into a search box, and it will bring up a different set of data.
What I'd like to be able to do is create a macro or VBA code which when I click a button, it will open the relevant link in Internet Explorer and search for the same unique number from the Excel file (for arguments sake, let's just say to search the contents from cell S3
).
I have no experience coding, so I'm not sure what you'd need to see. Here are screengrabs of the website with code for the text box and the search button if it helps?
Upvotes: 0
Views: 2638
Reputation: 2055
Sub DoBrowse()
myStr = cells(1,1).value
ActiveWorkbook.FollowHyperlink _
Address:="https://www.google.com/?q=" & myStr, _
NewWindow:=True
End Sub
Upvotes: 1