Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Deleting variable web query name


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deleting variable web query name

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" wrote in
message ...

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
another macro query - deleting a worksheet within a query DavidHawes Excel Discussion (Misc queries) 2 February 26th 07 10:05 AM
Deleting lines with a variable. [email protected] Excel Programming 2 October 2nd 05 11:46 AM
Deleting Web Query Problem dule[_6_] Excel Programming 1 February 27th 04 07:17 PM
Deleting a query Rhonda[_3_] Excel Programming 1 December 4th 03 10:47 PM
deleting variable number of rows Nick Excel Programming 1 October 29th 03 04:31 PM


All times are GMT +1. The time now is 12:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"