-
WSPaul Lautman
AskWoody LoungerWhich I posted above 2 days ago once I worked it out.
You need to access the sheet’s Name object:
Code:Debug.Print Worksheets("Sheet3").Range("bbb").Value Debug.Print Worksheets("Sheet3").Names("aaa").RefersToRange.Value
-
WSPaul Lautman
AskWoody LoungerI think I was aware of that. Indeed immediately following that post I posted:
“I’ll try that.I already use another_range_object.value = range_object.value which does the equivalent of Paste Special Values on a whole range. It’s just a pity that there is no such shorthsnd for column widths.”
-
WSPaul Lautman
AskWoody LoungerBob’s one doesn’t work on a set of columns, only on a single column and so doesn’t work.
-
WSPaul Lautman
AskWoody LoungerRetiredGeek,
that article talks about using them in sheet formulas and if you looked at my workbook you’d see it was already working there. In fact the help link I supplied earlier gives more information on range scope. -
WSPaul Lautman
AskWoody LoungerBob:
You said “However, your description did not mention that the ranges you created were LOCAL range names, only on sheet3.”
The very first line of the original post said “The attached workbook has 2 ranges defined with scope Sheet3.”You said “Excel can not interpret aaa to a range”
I say that it can and does. If you look in my sheet you will see that I have =aaa in a cell on sheet3 and Excel is interpreting it and showing the value of cell Sheet1!E4Your comment “You do have to be on the right sheet to use” is not true since in VBA you can (and normally should) qualify your locations using the correct level objects, possibly within a With block.
Not being funny but your explanation about how to use the name manager was a bit of a waste of time since I had already referred you to that myself.
In fact I have worked out that the answer to my question is to use:
Worksheets(“Sheet3”).Names(“aaa”).RefersToRange.Value -
WSPaul Lautman
AskWoody LoungerIf you tried that in my workbook (which I attached to the OP) then I do not believe that you got an output.
You can learn about the sope of range names by reading the help here:
http://office.microsoft.com/client/helpcategory14.aspx?CategoryID=CH010369092&lcid=2057&NS=EXCEL&Version=14&tl=2If you go into the name manager on my sheet you will see that the scope of aaa is Sheet3. If you go to sheet 1 and type
=aaa
into a cell you will get #NAME
This is why Debug.Print Worksheets(“Sheet1”).Range(“aaa”) can not work. Try going to the Name Box and click the drop down arrow on Sheet3. You will see aaa and bbb
Try that on Sheet1 and you will see an empty box.I have no idea what you used to get the value of aaa on Sheet1 printed but you did not use Debug.Print Worksheets(“Sheet1”).Range(“aaa”) in my workbook.
If you did it on RetiredGeek’s Copy of disappearing range.xlsm then you will have got Sheet1-E4. On mine you will get an error.
I suspect that this may be an Excel bug.
-
WSPaul Lautman
AskWoody LoungerI did try that. Did you try it before posting?
The referred to range may be located on Sheet1, but the scope of the range name is Sheet3. I was very careful to put this information in the OP.
Worksheets(“Sheet1”).Range(“aaa”) will not find the range name on Sheet1 since the scope of the range name is Sheet3.
-
WSPaul Lautman
AskWoody LoungerYou now have aaa defined at workbook level.
In my original workbook I had 2 ranges defined with a scope of Sheet3.
If I use a formula on Sheet3 of =aaa it correctly displayed the value of cell Sheet1!$E$4.
If I use a formula on Sheet2 of =bbb it will correctly display the value of cell Sheet3!$E$4
However in VBA, I can access the value referenced by Worksheets(“Sheet3”).Range(“bbb”).Value but not the value referenced by Worksheets(“Sheet3”).Range(“aaa”).Value
I am trying to accomplish getting the value of the referenced by Worksheets(“Sheet3”).Range(“aaa”).Value into the macro. You have redefined the range aaa so that it has WorkBook scope. I am trying to get the value when it is defined as having WorkSheets(“Sheet3”) scope.
-
WSPaul Lautman
AskWoody LoungerNo because it pastes from the clipboard which violates the “without going via the clipboard” in the OP.
-
WSPaul Lautman
AskWoody LoungerI’ll try that.I already use another_range_object.value = range_object.value which does the equivalent of Paste Special Values on a whole range. It’s just a pity that there is no such shorthsnd for column widths.
-
WSPaul Lautman
AskWoody LoungerWell, one can do a copy via an object (i.e. not via the clipboard) using:
range_object.Copy Destination:=another_range_object
As well as copying the data, I also wish to copy the column widths to the destination range.
-
WSPaul Lautman
AskWoody LoungerWow Hans. Not only does it work, it is better than my original formula (which did appear to work OK when there was only one form present).
Thank you, Thank you, Thank you, Thank you.
-
WSPaul Lautman
AskWoody LoungerIn all of the subrate ones. It is showing FALSE on all of them
-
WSPaul Lautman
AskWoody LoungerDoesn’t seem to in this extended version.
-
WSPaul Lautman
AskWoody Lounger
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
inetpub : Microsoft’s patch for CVE-2025–21204 introduces vulnerability
by
Alex5723
4 hours, 20 minutes ago -
Windows 10 finally gets fix
by
Susan Bradley
13 hours, 13 minutes ago -
AMD Ryzen™ Chipset Driver Release Notes 7.04.09.545
by
Alex5723
14 hours, 33 minutes ago -
Win 7 MS Essentials suddenly not showing number of items scanned.
by
Oldtimer
9 hours, 6 minutes ago -
France : A law requiring messaging apps to implement a backdoor ..
by
Alex5723
1 day, 3 hours ago -
Dev runs Windows 11 ARM on an iPad Air M2
by
Alex5723
1 day, 4 hours ago -
MS-DEFCON 3: Cleanup time
by
Susan Bradley
1 hour, 4 minutes ago -
KB5056686 (.NET v8.0.15) Delivered Twice in April 2025
by
lmacri
23 hours, 51 minutes ago -
How to enable Extended Security Maintenance on Ubuntu 20.04 LTS before it dies
by
Alex5723
1 day, 15 hours ago -
Windows 11 Insider Preview build 26200.5562 released to DEV
by
joep517
1 day, 19 hours ago -
Windows 11 Insider Preview build 26120.3872 (24H2) released to BETA
by
joep517
1 day, 19 hours ago -
Unable to eject external hard drives
by
Robertos42
6 hours, 10 minutes ago -
Saying goodbye to not-so-great technology
by
Susan Bradley
3 minutes ago -
Tech I don’t miss, and some I do
by
Will Fastie
38 minutes ago -
Synology limits hard drives
by
Susan Bradley
2 days, 23 hours ago -
Links from Microsoft 365 and from WhatsApp not working
by
rog7
2 days, 2 hours ago -
WhatsApp Security Advisories CVE-2025-30401
by
Alex5723
3 days, 5 hours ago -
Upgrade Sequence
by
doneager
2 days, 23 hours ago -
Chrome extensions with 6 million installs have hidden tracking code
by
Nibbled To Death By Ducks
1 day, 4 hours ago -
Uninstall “New Outlook” before installing 2024 Home & Business?
by
Tex265
1 day, 22 hours ago -
The incredible shrinking desktop icons
by
Thumper
4 days, 3 hours ago -
Windows 11 Insider Preview Build 22635.5240 (23H2) released to BETA
by
joep517
4 days, 4 hours ago -
Connecting hard drive on USB 3.2 freezes File Explorer & Disk Management
by
WSJMGatehouse
1 day, 3 hours ago -
Shellbag Analyser & Cleaner Update
by
Microfix
21 hours, 7 minutes ago -
CISA warns of increased breach risks following Oracle Cloud leak
by
Nibbled To Death By Ducks
4 days, 13 hours ago -
Outlook 2024 two sent from email addresses
by
Kathy Stevens
1 hour, 9 minutes ago -
Speeding up 11’s search
by
Susan Bradley
2 days, 2 hours ago -
HP Pavilion Will Not Wake Up After Being Idle for Longer Period
by
WSwalterwood44
2 days, 14 hours ago -
Make a Windows 11 Local Account Passwordless
by
Drcard:))
5 days, 3 hours ago -
Ubuntu 25.04 (Plucky Puffin)
by
Alex5723
5 days, 11 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.