Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue.

I'm trying to name a range to automate some charting. The range I wan
to name begins in in cell b3 and ends in b36. The issue is that cell
b3 - b20 are blank for example. Within Excel, I can select CTRL
SHIFT+ DOWN twice to select the entire range. VBA however, will no
allow me to perform this action twice. It simply ignores the secon
command. I'm using the Range(selection,selection(xldown).selec
command. Any suggestions

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue.

Range(selection,selection.End(xldown).End(xldown)) .select


--
Regards,
Tom Ogilvy

"jonH " wrote in message
...
I'm trying to name a range to automate some charting. The range I want
to name begins in in cell b3 and ends in b36. The issue is that cells
b3 - b20 are blank for example. Within Excel, I can select CTRL +
SHIFT+ DOWN twice to select the entire range. VBA however, will not
allow me to perform this action twice. It simply ignores the second
command. I'm using the Range(selection,selection(xldown).select
command. Any suggestions?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue.


no selection needed.. you know the address.. keep it simple!

Sub NameIt()
ActiveSheet.Range("B3:B36").Name = "MyGlobalName"
ActiveSheet.Range("B3:B36").Name = ActiveSheet.Name & "!MyLocalName"
End Sub

Tip: save y'self some aggravation and buy a simple VBA book.
once you understand the basics the rest will be easy.

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


jonH wrote:

I'm trying to name a range to automate some charting. The range I want
to name begins in in cell b3 and ends in b36. The issue is that cells
b3 - b20 are blank for example. Within Excel, I can select CTRL +
SHIFT+ DOWN twice to select the entire range. VBA however, will not
allow me to perform this action twice. It simply ignores the second
command. I'm using the Range(selection,selection(xldown).select
command. Any suggestions?


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue.

Perfect. I think I tried everything but that. Thanks

--
Message posted from http://www.ExcelForum.com

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
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Multiple range selection issue SPV Excel Discussion (Misc queries) 1 June 27th 07 04:15 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 03:51 AM
Selection.End(xlDown) with Rows selected Tokash Excel Programming 1 August 19th 03 03:52 PM
Selection.End(xlDown) with Rows selected norman Excel Programming 0 August 19th 03 01:45 AM


All times are GMT +1. The time now is 07:06 AM.

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

About Us

"It's about Microsoft Excel"