View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
jlclyde jlclyde is offline
external usenet poster
 
Posts: 410
Default User Form to get Hyperlink

On Dec 18, 11:09*am, jlclyde wrote:
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