Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HYPERLINK

Status
Not open for further replies.

jamie13

MIS
Jan 15, 2002
43
CA
Does anyone know how i can create a hyperlink to another file using vbcode?
Thanks
Jamie
 
Why does it need to be VB? Can you use the DataType = Hyperlink in a table?
Do a search - "hyperlink" in the faq's. There's lot's o' postings.
 
Here's a little code I use to open up ArcView:

Dim stAppName As String
stAppName = "c:\esri\av_gis30\arcview\bin32\arcview.exe_ C:\sourcewater.apr"
Call Shell(stAppName, 1)
 
Hi Jamie,

Do you want to be able to select a file from a dialog, type in the file name manually or programatically add multiple file names as hyperlinks at once? I think I can help you regarding the first two--and possibly the third--but I don't want to post a bunch of junk that won't help you. Can you be more specific?

Thanks!!!
Keith
 
I want to click a bbutton, which will automatically open another file located on a network drive.

Jamie
 
Hi Jamie,

I understand that part--but do you want to always open the same file every time? I'm assuming from your last post that this is the case--but if not the answer might be different.

If you are going to open the same file each time, simply do what Isadore said in the post on Feb 4--copy and paste the code provided and apply that to the OnClick event of your button. Then simply substitute you application path and name and the target file's path and name in place of those Isadore used. This would not be what I'd call a hyperlink, per se--but would accomplish the same thing in an efficient manner.

If you need to choose a file before clicking the button, let me know and I can provide that code--again, I don't want to go to the trouble of pulling together all that info for you if you don't need it (you won't if you want to open the same file each time--again, use Isadore's method in your OnClick event for the button).

Your original post regarding the hyperlink is what caught my attention: it is worded in such a way that I read it as though you wanted to be able to choose a file from a dialog and convert the chosen path/file into a hyperlink via VBA, writing it to the record. I have a good way of doing this--but it doesn't sound like that's what you are looking to do.

I'm not trying to be vague or elusive with a response--I was just not 100% sure about what you are looking for--and am still not since you have not been able to apply Isadore's method as I cannot imagine why that would not work.

Please let me know if this has helped.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top