I am attempting to read all named ranges in Excel SS in all Sheets and return the RangeName and the Value in the range but code only works for the selected sheet.
This code works but only in the active sheet:
Set nms = ActiveWorkbook.Names
For r = 1 To nms.Count
sFieldName = nms(r).Name
MyVal = ActiveSheet.Range(nms(r).Name).Value
Next
The intention is to permit Excel to inteface to Access using the rangename as the field lookup and the value to be inserted into the Access field.
Thanks - it must be staring me right in the face?
Rhinoman
x-)
This code works but only in the active sheet:
Set nms = ActiveWorkbook.Names
For r = 1 To nms.Count
sFieldName = nms(r).Name
MyVal = ActiveSheet.Range(nms(r).Name).Value
Next
The intention is to permit Excel to inteface to Access using the rangename as the field lookup and the value to be inserted into the Access field.
Thanks - it must be staring me right in the face?
Rhinoman
x-)