Add hyperlink button

P

PJFry

I would like to add a command button to a form that will open a windows
dialog box that allows the user to nagivate to a file and insert a hyperlink
to that file.

I remember doing something similar a few years ago using SendKeys, but I
would like to avoid that if at all possible.

Thoughts?

PJ
 
P

Piet Linden

I would like to add a command button to a form that will open a windows
dialog box that allows the user to nagivate to a file and insert a hyperlink
to that file.

I remember doing something similar a few years ago using SendKeys, but I
would like to avoid that if at all possible.  

Thoughts?

PJ

Use the OpenFile API at AccessWeb (http://www.mvps.org/access/api/
api0001.htm) and then *format* the related control on your form as a
hyperlink. You might need to convert to a UNC path, though... there's
code for it somewhere on VB Net
(try this one:)
http://vbnet.mvps.org/code/network/uncfrommappeddrive.htm

then just grab the result (wrap it in a function, and assign the
result to the textbox...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top