-1

I would like to create a button to open a url that is shown in a excel cell. the url is generated by the user filling in some information so i'd like to put a button next to the end url which will take the user directly to the page they requested.

could someone please help with this question?

Thanks Ian

Archer
  • 1
  • 1
  • 2
    It looks like you want us to write some code for you. While many users are willing to produce code for a coder in distress, they usually only help when the poster has already tried to solve the problem on their own. A good way to demonstrate this effort is to include the code you've written so far, example input (if there is any), the expected output, and the output you actually get (console output, tracebacks, etc.). The more detail you provide, the more answers you are likely to receive. Check the [FAQ] and [ask]. – Pm Duda Sep 06 '18 at 13:58
  • 3
    If there's a URL in the cell already, isn't it a link? If it's not a link, you could easily make it one with the =HYPERLINK() function. Does this really need any VBA at all? – tigeravatar Sep 06 '18 at 14:02
  • Possible duplicate of [Open an html page in default browser with VBA?](https://stackoverflow.com/questions/3166265/open-an-html-page-in-default-browser-with-vba) – Franz Sep 06 '18 at 14:13

1 Answers1

0

You could use the solution from there Open an html page in default browser with VBA?:

Public Sub ButtonClick()
    ThisWorkbook.FollowHyperlink (Range("B2").Value)   'TODO: change cell!
End Sub
Franz
  • 340
  • 1
  • 10