Trying to delete a webquery range that is a variable.
ActiveWorkbook.Names("st_rejs").Delete
The first time is "st_rejs" and every time I run a macro the name maybe st_rejs_1 or so 2 or 3.
How to rewrite this lines of code with that in mind?
Trying to delete a webquery range that is a variable.
ActiveWorkbook.Names("st_rejs").Delete
The first time is "st_rejs" and every time I run a macro the name maybe st_rejs_1 or so 2 or 3.
How to rewrite this lines of code with that in mind?
Dim nm as Name
for each nm in Activeworkbook.Names
if nm.Name like "st_rejs*" then
nm.delete
end if
Next
--
Regards,
Tom Ogilvy
"wayliff" <[email protected]> wrote in
message news:[email protected]...
>
> Trying to delete a webquery range that is a variable.
>
>
> ActiveWorkbook.Names("st_rejs").Delete
>
> The first time is "st_rejs" and every time I run a macro the name maybe
> st_rejs_1 or so 2 or 3.
>
> How to rewrite this lines of code with that in mind?
>
>
> --
> wayliff
> ------------------------------------------------------------------------
> wayliff's Profile:
http://www.excelforum.com/member.php...o&userid=29860
> View this thread: http://www.excelforum.com/showthread...hreadid=502192
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks