I am trying to copy a value from a named range in one workbook into a named range in another workbook. I am hitting an issue with getting the value from the other workbook. I am using the code:
i = 0
sWorkBookB = Range("BaseFileName").Value
sWorkSheetB = Range("HCSheetName").Value
sNewValue = Workbooks(sWorkBookB).Worksheets(sWorkSheetB).Range("Value1").Offset(i, 0).Value
This is returning a blank in the immediate window but the Value1 named range is a cell with the word "Fund" in it.
Any help would be apricated.
i = 0, then.Offset(i, 0)is redundant. What other debugging have you done, e.g. usingDebug.Print Workbooks(sWorkBookB).Worksheets(sWorkSheetB).Range("Value1").Address? - BigBen