Can't change name of querytable.

B

Bing

Hello

Why is it when i delete all the querytables in a worksheet, and then add
another one with a name say "qt", excel seems to keep on appending numbers
to the end of the name ie. "qt_1", or "qt_2". No matter how i try to set the
name to "qt", it doesn't seem to change.

ie.
With activesheet.QueryTables.Add(Connection:="TEXT;c:\log.txt"),
Destination:=Range("A2"))
.Name="qt"
End With

When i check the name in the VBE, it's assigned a name of "qt_X", where X is
some number.

How do i stop excel from appending these numbers and change the name of the
querytable to what i want it to be?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top