Hi all,
Quick question:
I have a spreadsheet containing invalid ranges, I want to delete.
Range names are with invalid caracters pointing at invalid references with #HREF...
I tried to delete them from Inser>Name...Delete - Did not work
Then I tried to list them and kill them from VBA.
---
Sub Listranges()
'On Error Resume Next
Range("A:A").Delete
For i = 1 To 100
Sheets("test").Cells(i, 1).Value = Application.ActiveWorkbook.Names(i)
Next i
End Sub
Sub ClearRanges()
'On Error Resume Next
For i = 1 To 10
Application.ActiveWorkbook.Names(i).Delete
Next i
End Sub
---
When trying to delete the range I am getting an "object define error"
PS: This code is woking on fine ranges.
Any ideas?
Thanks
Seb
Quick question:
I have a spreadsheet containing invalid ranges, I want to delete.
Range names are with invalid caracters pointing at invalid references with #HREF...
I tried to delete them from Inser>Name...Delete - Did not work
Then I tried to list them and kill them from VBA.
---
Sub Listranges()
'On Error Resume Next
Range("A:A").Delete
For i = 1 To 100
Sheets("test").Cells(i, 1).Value = Application.ActiveWorkbook.Names(i)
Next i
End Sub
Sub ClearRanges()
'On Error Resume Next
For i = 1 To 10
Application.ActiveWorkbook.Names(i).Delete
Next i
End Sub
---
When trying to delete the range I am getting an "object define error"
PS: This code is woking on fine ranges.
Any ideas?
Thanks
Seb