I am trying to extract data from a standardized excel form where all the values I want are namedRanges. The NamedRanges are worksheet specfic, e.g. c_001 referes to Sheet1!$X$38.
I have tried retrieving all Names in the workbook, e.g.
'Runtime error 13 - Type mismatch
Set namesInWb = Workbooks(wbName).Names
This does not seem to work though, possibly since all the names are worksheet specific?
I then thought I could get the namne through the Range object, e.g. I want to be able to use something like this to get the wsName:
tempRange.Worksheet.Name
I need to retrieve the Range object first though, but nothing I can think of works without knowing the worksheet name.
'Not working - Runtime error 438 - Object does not support this property or method
Set tempRange = Workbooks(wbName).Range("c_001")
'This works now, only failed due to another error earlier in the code that I had missed
Set tempRange = Range(currentName)
UPDATE: Last method works now. Only failed due to errors earlier in the code which I had missed.