View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ward376 ward376 is offline
external usenet poster
 
Posts: 360
Default Select range then name it

Try:
sub definename()
activecell.currentregion.select
Application.Dialogs(xlDialogDefineName).Show
end sub
This will select the current region of the active cell and open the
define names dialog; the user can just type the name in and hit enter
to name the range.

Caveats:
1. This aassumes that the active cell is in the downloaded range.
2. You'll have to develop this further if you have multiple downloaded
ranges in contiguous ranges on the same sheet. This will work as long
as each download is separated from others.

Note: Depending on how the info is downloaded, the range may already
be named. (i.e. MS Query) Check your name drop-down. This would make
it a lot easier to work with multiple contiguous downloaded ranges.

Cliff Edwards