#1   Report Post  
Junior Member
 
Posts: 2
Question Named Ranges in VBA

I need to know how to name a range using VBA. The example as follows does not work.
Selection.Name = "Named Range".
What is the correct syntax for this?
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

The syntax is correct. Then Name isn't valid (contains a space).

This worked ok for me:

Selection.Name = "Named_Range"



Bruce wrote:

I need to know how to name a range using VBA. The example as follows
does not work.
Selection.Name = "Named Range".
What is the correct syntax for this?

--
Bruce


--

Dave Peterson
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
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Macro (Print) - Calling Named Ranges KGlennC Excel Discussion (Misc queries) 1 March 19th 05 09:20 PM
Named Ranges Donna Excel Discussion (Misc queries) 3 February 1st 05 11:35 PM
Named Ranges Gary T Excel Worksheet Functions 2 December 27th 04 02:28 AM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


All times are GMT +1. The time now is 04:27 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"