View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kieran H Kieran H is offline
external usenet poster
 
Posts: 32
Default Trailing number on Named Region

Hi,

I realise that this has probably been discussed previously but I
failed to find a useful thread.

I'm creating named regions programatically (corresponding to
querytables)
but I end up with an underscore and a number following my chosen name.

What is the best way of correcting / preventing this behaviour

Note that my code attempts to clear existing names with the
following:

With ThisWorkbook.Sheets("data")
.Cells.Clear
For Each qt In .QueryTables
qt.Delete
Next
For Each nName In .Names
nName.Delete
Next
End With

Any help would be appreciated

Regards

Kieran