This code will create links to specific cells - you can convert the formula to a value if you want to break the link. Give it a try ans see if it does what you want, then post back if you want different behavior (and post how you modified the code, too).
Sub MakeLinksUsingGetOpenFileName()
Dim strFileWithData As String
Dim strFormula As String
Dim strSheetName As String
Dim strPath As String
Dim strFilename As String
strFileWithData = Application.GetOpenFilename(Title:="Select the file with the data")
strSheetName = "Main" 'Make sure this is the sheet name with the data you want
strPath = Left(strFileWithData, InStrRev(strFileWithData, "\"))
strFilename = Split(strFileWithData, "\")(UBound(Split(strFileWithData, "\")))
'Generate strFormula through string manipulation
strFormula = "='" & strPath & "[" & _
strFilename _
& "]" & strSheetName & " '!"
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
'Set cell formulas - I hope you see the pattern
With ThisWorkbook.WorkSheets("Tenancy Info") 'Make sure the sheet name is correct
.Range("B1").Formula = strFormula & "C6" 'Create a link in B1 to cell C6
.Range("B2").Formula = strFormula & "E2"
.Range("B3").Formula = strFormula & "J7"
.Range("B4").Formula = strFormula & "H9"
.Range("B5").Formula = strFormula & "K5"
.Range("B6").Formula = strFormula & "M4"
End With
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
End Sub
Bookmarks