Hey Everyone,
I have named ranges in a particular worksheet. All the named ranges are specific only. Someone helped me concatenate the appropriate strings. Awesome.
However, I want the user of the worksheet to be able to clear the names of the worksheet before they start naming the ranges. Just in case. I found something else and I'm trying to adapt it
specifically this is where I am:
Sub delnames()
Dim nName As Name
Dim shtname As String
shtname = ActiveSheet.Name
For Each nName In ThisWorkbook.Names
If nName.RefersTo = "=" & shtname & "'!" Then nName.Delete
Next
End Sub
I think I may need to use something other than RefersTo. Is there some string specific conditional I might want to use?
Bookmarks