Follow Hyperlink Function

N

Nicole

I am trying to use the Hyperlink Function to open a hyperlink in a field that
will allow users to specify what that hyperlink is. For fixed hyperlinks I
am successfully using the following:

Dim ctl As CommandButton

Set ctl = Me!SeeBlankTemplate
With ctl
.Visible = False
.HyperlinkAddress = "\\ibr2fodnjohnson\c$\shared files\Closeout Cover
Sample.doc"
.Hyperlink.Follow
End With

How do I state .HyperlinkAddress in a case where this varies?
 
D

Daniel

Nicole,

I'm not sure I understand. Perhaps you could elaborate a bit more.

However, if all you are trying to do is 'open a hyperlink' then you can
simply use the Application.FollowHyperlink Method

Let say you have a textbox named hprlnk which has the path/filename to be
opened then it would look like

Application.FollowHyperlink Me.hprlnk

If on the other hand you are trying to create an interface which allows the
users to select a file and create a hyperlink based on the selected file then
you need to utilize the file open/save api

http://www.mvps.org/access/api/api0001.htm

Explain a bit more and I can try to guide you better.
 
N

Nicole

Daniel:

Yes, all I want to do is open a hyperlink from a hyperlink text box.

Using...

Application.FollowHyperlink Me.hprlnk

....works to a certain extent. Now, if you can advise on how to eliminate
the auto error message which warns of the dangers of opening hyperlinks, I
can start cooking with fire. Clicking "Yes" to continue opening the
hyperlink causes Runtime Error "490." Any suggestions?

Nicole
 

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

Similar Threads

hidden Hyperlink 1
Set Hyperlinkaddress to field from query and loop 0
Hyperlink 0
Hyperlink 0
Function going wrong 2
Help with code 2
Follow Hyperlink to .pps file 7
Open to Veiw(Read only) files from VB 0

Top