Excel VBA help please

Associate
Joined
26 Aug 2006
Posts
302
Hi all,

I've got a button on an excel worksheet that I want to press to populate a web browser control with an email address.

At the moment, the code I have is this:

Private Sub CommandButton1_Click()
ThisWorkbook.ActiveSheet.WebBrowser1.Navigate2 "http://www.bbc.co.uk"
End Sub


This works, however I would like the code to look at whatever URL is in a certain cell on the spreadsheet, rather than having it written in the code as above.

What would I need to replace the "http://www.bbc.co.uk" with in the code to look at the value of say, cell J2?

Many thanks,
Paul

*Figured it out, I needed Range("C1").Text*
 
Last edited:
Back
Top Bottom