title: Use .getopenfile name to create hyperlink and also use as file path to link cells
body: <p>I have an excel macro that asks a user to select a file using <code>.GetOpenFilename</code>.  Once the user has selected the file, the macro creates a hyperlink for said file.  The next step I would like the macro to complete is to use that selected file to create links into a summary sheet where the macro lives.  I have it set up now and it works if I pre determine the file name but it will be different every time so I want to use the file that the user selected.  The file that the user selects is from a template, I have already named the cells that I need to link in the template to make it easier.  The code I have is below,  I think what I need is to replace the <code>[my_Filename]</code> with whatever the proper code is.</p>
  
  <pre><code>Dim rngDestin0 As Range
  Dim rngDestin1 As Range
  Dim rngDestin2 As Range
  Dim rngDestin3 As Range
  
  
  Dim my_FileName As String
  Dim fPath As String, fName As String
  fPath = Application.GetOpenFilename("Excel Files (*.xlsm), *.xlsm")
  fName = Split(fPath, Application.PathSeparator)(UBound(Split(fPath, 
  Application.PathSeparator)))
  
  my_FileName = Application.GetOpenFilename("Excel Files (*.xlsm), *.xlsm")
  
  Set rngDestin0 = Range("SO_Number").Resize(1).Offset(-1)
  
  With Range("A1").Hyperlinks
      .Delete
      .Add Anchor:=rngDestin0, Address:=fPath, TextToDisplay:=fName
  End With
  
  
  
  'SALES ORDER NUMBER LINK
  Set rngDestin1 = Range("SO_Number").Resize(1).Offset(-1)
  rngDestin1.Select
  ActiveCell.FormulaR1C1 = "='[my_FileName]tab1'!S_O_N"
  
  'JOB NUMBER LINK
  Set rngDestin2 = Range("A").Resize(1).Offset(-1)
  rngDestin2.Select
  ActiveCell.FormulaR1C1 = "='[my_FileName]tab1'!Job_Num"
  
  'START DATE LINK
  Set rngDestin3 = Range("B").Resize(1).Offset(-1)
  rngDestin3.Select
  ActiveCell.FormulaR1C1 = "='[my_FileName]tab1'!Job_Start"
  </code></pre>