How can I create a URL with link using the VBA form.

D

Daniel

I have created a form for user entry to add a record. The form consist
of a column which allows user to enter a URL of a web site. The value
can be inserted to the cell successfully, however, the url is just
displayed as a text with a link. So I want to ask how can I create the
link automatically?

Thanks
 
D

Dave Peterson

One way is to add the string as part of an =hyperlink() formula:

Say they type www.ms.com (no http://).

then this would work:

Worksheets("sheet1").Range("a1").Formula _
= "=hyperlink(""http://" & myForm.TextBox1.Value & """)"
 
Top