User Form to get Hyperlink

J

jlclyde

I am trying to put together a user form that will open windows
explorer and let the person choose a file but not open it. I want it
to record the file name to be ised later on in the work sheet and to
make a link out of it to that location. Is this possible? I have
been playing with the Application.GetOpenFilename, but this is nto
gettign me the address, it is just letting me open a file.

Thanks,
Jay
 
J

jlclyde

I am trying to put together a user form that will open windows
explorer and let the person choose a file but not open it.  I want it
to record the file name to be ised later on in the work sheet and to
make a link out of it to that location.  Is this possible?  I have
been playing with the Application.GetOpenFilename, but this is nto
gettign me the address, it is just letting me open a file.

Thanks,
Jay

Never mind!

I answered my own question. GetOpenFilename does get the name and
then I set a cell to be the text. Check it out.
Sub OpenWindowsExplorer()
Dim FileNm As String

FileNm = Application.GetOpenFilename("All files (*.*),*.*")
Range("F1").Hyperlinks.Add Anchor:=Selection, Address:= _
FileNm, TextToDisplay:="Supporting.doc"
End Sub
Sorry,
Jay
 

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


Top