Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default range.createnames method

I'm trying to use the method to create names for columns in "Myrange" with
the statement: Myrange.createnames Top:=True. It doesn't seem to execute
properly. First, it won't execute until I answer the question "Do you want
to redefine 'TDA'? TDA is the first entry in the second row first column,
and I have to answer the question for each entry in the first column of every
row. After I do that it executes and all the columns get named as expected,
except the first column. The name for the first column appears in the name
manager list but it is the original range less the first row and the first
column--it is supposed to be just the first column. Also a lot of the first
column entries end up in the name manager list and are names for their entire
row. Does anyone have any experience with this method and know whether it
works properly.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default range.createnames method

You can suppress the prompt with this: Application.DisplayAlerts = False

I don't follow you exactly on the problem with the resulting range names but
if you get the right result manually you might try recording a macro as you
do it and then replace "Selection" in the resulting code with the exact
range, e.g., Range("A1:D4").CreateNames Top:=True. This would result in
names being created for the ranges A2:A4, B2:B4, etc.

--
Jim
"DaveL" wrote in message
...
| I'm trying to use the method to create names for columns in "Myrange" with
| the statement: Myrange.createnames Top:=True. It doesn't seem to execute
| properly. First, it won't execute until I answer the question "Do you
want
| to redefine 'TDA'? TDA is the first entry in the second row first column,
| and I have to answer the question for each entry in the first column of
every
| row. After I do that it executes and all the columns get named as
expected,
| except the first column. The name for the first column appears in the
name
| manager list but it is the original range less the first row and the first
| column--it is supposed to be just the first column. Also a lot of the
first
| column entries end up in the name manager list and are names for their
entire
| row. Does anyone have any experience with this method and know whether it
| works properly.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default range.createnames method

Jim,

Thanks! Did the manual approach from a worksheet and it worked fine,
including the first row. However, first I had to delete all the names in the
name manager list that were referred to that range. After I did that there
were no prompts and the first row did get named properly.. When I did it
manually I notice that the default for "Left" was "True" as was "Top". All
others were false. That could have been the reason some of the rows were
named by the left column--I needed to set "Left" to "false". Anyway, I'm
convinced it work and Ill play with it in VBA language to see what needs to
be set/deleted to make it work that way.

Dave

"Jim Rech" wrote:

You can suppress the prompt with this: Application.DisplayAlerts = False

I don't follow you exactly on the problem with the resulting range names but
if you get the right result manually you might try recording a macro as you
do it and then replace "Selection" in the resulting code with the exact
range, e.g., Range("A1:D4").CreateNames Top:=True. This would result in
names being created for the ranges A2:A4, B2:B4, etc.

--
Jim
"DaveL" wrote in message
...
| I'm trying to use the method to create names for columns in "Myrange" with
| the statement: Myrange.createnames Top:=True. It doesn't seem to execute
| properly. First, it won't execute until I answer the question "Do you
want
| to redefine 'TDA'? TDA is the first entry in the second row first column,
| and I have to answer the question for each entry in the first column of
every
| row. After I do that it executes and all the columns get named as
expected,
| except the first column. The name for the first column appears in the
name
| manager list but it is the original range less the first row and the first
| column--it is supposed to be just the first column. Also a lot of the
first
| column entries end up in the name manager list and are names for their
entire
| row. Does anyone have any experience with this method and know whether it
| works properly.


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
Custom Range Method Matthew Pfluger Excel Programming 5 August 8th 08 03:08 PM
"PasteSpecial method of Range class failed" when range Number of Rows 2000 eskimo2 Excel Programming 0 October 19th 07 06:09 PM
Range Question / error 1004: method Range of object Worksheet has failed Paul Excel Programming 3 April 7th 05 02:56 PM
Adding named range gives error "method range of object _Global failed " Gunnar Johansson Excel Programming 3 August 10th 04 01:54 PM
Pass a range to a method? Frank Kabel Excel Programming 12 May 21st 04 02:50 AM


All times are GMT +1. The time now is 02:46 PM.

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"