LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default returning the first name on the list assigned to a particular rang

Hi,

my problem is as follows:

There is a piece of code in MS VB Help that says:

"Range Objects
Although a Range object can have more than one name, theres no Names
collection for the Range object. Use Name with a Range object to return the
first name from the list of names (sorted alphabetically) assigned to the
range. The following example sets the Visible property for the first name
assigned to cells A1:B1 on worksheet one.

Worksheets(1).Range("a1:b1").Name.Visible = False"

Now, the problem is that it doesn't work, at least for me. I have defined a
name "Whole" with reference: "=Sheet1!$1:$65536", and a macro:

Sub Wholemacro()
Worksheets("sheet1").Range("a1").Name.Visible = False
End Sub

Nevertheless, all I ever get when trying to run the code is "Run-time error
'1004': Application-defined or object-defined error". The macro code is as
follows:

Please help!

Thanks in advance


 
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
Conditionally format a cell using a list of data defined in a rang Chad Wodskow[_2_] Excel Worksheet Functions 2 March 4th 10 06:04 PM
how to list all active macros and their assigned keystrokes? z.entropic Excel Worksheet Functions 2 October 5th 07 03:29 PM
Returning looking up all values in a list Ted Metro Excel Worksheet Functions 1 January 29th 07 09:12 PM
Returning next value from a list Lucas Excel Worksheet Functions 2 December 19th 05 09:08 PM
Returning list values bruner Excel Worksheet Functions 5 August 11th 05 09:32 PM


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