Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi b-123,
Something like this should work for you: Sub Demo() Dim vFilePath As Variant vFilePath = Application.GetOpenFilename(FileFilter:= _ "Microsoft Excel Files (*.xls), *.xls", Title:= _ "Please select a file to hyperlink.") If vFilePath < False Then With Sheet1 .Hyperlinks.Add Anchor:=.Range("A1"), _ Address:=vFilePath End With End If End Sub -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] b-123 wrote: Hi all- I tried searching through the forum but couldn't find answer: I want to add a command button to a form where if a user clicks it a file browse window comes up (like for opening a file) and if a user navigates through and selects a file I assign the path to this file as a hyperlink to an entry in a spreadsheet - so that a future user can open this file just by clicking on the link. I learned how to assign hyperlink by doing a macro record, but do not know how to incorporate file browse function. any help would be much appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open Dialog Box to return Selected File Path and Not Open it. | Excel Programming | |||
using Windows API Open Dialog/Browse in VBA - center form in scree | Excel Programming | |||
File Open Dialog | Excel Programming | |||
Dialog For Choosing A File as a string | Excel Programming | |||
open file dialog-select file-import worksheet | Excel Programming |