Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Method 'Range' of object '_Worsheet' failed in Union of 3 Ranges

If I follow what you are trying to do the answer is no. You can't change a
named range to refer to cells on whatever sheet happens to be active
(actually there is a convoluted way but not viable for what you have in
mind).

What you can do is have identically named Worksheet level names. These named
ranges could refer to similar cell references on each sheet. However that
will still mean a set of names for each sheet.

To create a Worksheet level name

ActiveSheet.Names.Add "myName", theRange
Manually, prefix the name with SheetName!, eg

Sheet1!myName ' if it fails embrace the sheet name with apostrophes

Regards,
Peter T

wrote in message
...
Ok, it's working now !@#$
It's working as long as the named ranges are specific to the sheet
(ie., have the sheet's name in the range def like ='Period 2'!$AW
$13:$FB$13,'Period 2'!$AW$15:$FB$15,'Period 2'!$AW$17:$FB$17,'Period
2'!$AW$19:$FB$19,'Period 2'!$AW$21:$FB$21,'Period 2'!$AW$23:$FB
$23,'Period 2'!$AW$25:$FB$25,'Period 2'!$AW$27:$FB$27)

I was just trying to do it so didn't have to make 3 named ranges on 7
different sheets. If it's possible to make 3 global ranges (without
specifying 'Period__'!) for use across multiple sheets, just let me
know.

Your time and advice is very much appreciated.



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
Method 'Union' of object '_Application' failed (Runtime Error 1004 vivmaha Excel Programming 3 June 19th 07 01:17 AM
Method 'Range' of object '_Global' failed Graham Excel Programming 4 November 6th 06 08:33 PM
Method 'Union' of object '_Global' failed error sloth Excel Programming 1 October 2nd 06 07:09 AM
Union method for Range Object Chad Excel Programming 5 March 10th 05 08:02 PM
Method 'Range' of object '_Global' failed Brian Morris[_2_] Excel Programming 1 December 10th 03 11:04 PM


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"