Hi,
This is a pretty simple problem that I can't figure out for the past 3 hours. How do I find the name of a range given the range's address? The big problem is that range.name does not give the name I gave the range.
Dim lRange as Excel.Range
myWorkbook.Name.Add "Range1" rangeAddress TRUE
lRange = myWorksheet.Range(rangeAddress)
MsgBox lRange.name
Note that myWorkbook has already been created and myWorksheet is activeworksheet of myWorkbook. I want to retrieve the string "Range1" given only the rangeAddress. Thanks!
This is a pretty simple problem that I can't figure out for the past 3 hours. How do I find the name of a range given the range's address? The big problem is that range.name does not give the name I gave the range.
Dim lRange as Excel.Range
myWorkbook.Name.Add "Range1" rangeAddress TRUE
lRange = myWorksheet.Range(rangeAddress)
MsgBox lRange.name
Note that myWorkbook has already been created and myWorksheet is activeworksheet of myWorkbook. I want to retrieve the string "Range1" given only the rangeAddress. Thanks!