-
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. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
Looking for Microsoft Defender Manuals/Tutorial
by
blueboy714
4 minutes ago -
Win 11 24H2 Home or Pro?
by
CWBillow
1 minute ago -
Bipartisan Effort to Sunset the ‘26 Words That Created the Internet’..
by
Alex5723
4 hours, 43 minutes ago -
Outlook new and edge do not load
by
cHJARLES a pECKHAM
16 hours, 39 minutes ago -
Problem using exfat drives for backup
by
Danmc
16 hours, 57 minutes ago -
I hate that AI is on every computer we have!
by
1bumthumb
18 hours, 15 minutes ago -
Change Info in the Settings window
by
CWBillow
23 hours, 38 minutes ago -
Attestation readiness verifier for TPM reliability
by
Alex5723
1 day, 6 hours ago -
Windows Update says that “some settings are managed b your organization”
by
Ed Willers
15 hours, 46 minutes ago -
Use of Gmail rejected.
by
CBFPD-Chief115
16 hours, 26 minutes ago -
WuMgr operational questions
by
Tex265
3 minutes ago -
Beijing’s unprecedented half-marathon: Humans vs. humanoids!
by
Alex5723
1 day, 21 hours ago -
New Phishing Campaign Targeted at Mac Users
by
Alex5723
21 hours, 49 minutes ago -
Backing up Google Calendar
by
CWBillow
2 days, 3 hours ago -
Windows 11 Insider Preview build 27818 released to Canary
by
joep517
2 days, 16 hours ago -
File Naming Conventions (including Folders)
by
Magic66
1 day, 15 hours ago -
Windows 11 Insider Preview Build 26100.3613 (24H2) released to Release Preview
by
joep517
2 days, 23 hours ago -
Microsoft sends emails to Windows 10 users about EOS
by
Alex5723
2 days, 10 hours ago -
Outlook 2024 importing Calendar and Contacts – FAILURE
by
Kathy Stevens
1 day, 16 hours ago -
Adding Microsoft Account.
by
DaveBRenn
3 days, 1 hour ago -
Windows 11 Insider Preview build 26120.3576 released to DEV and BETA
by
joep517
4 days ago -
Windows 11 Insider Preview Build 22635.5090 (23H2) released to BETA
by
joep517
4 days, 1 hour ago -
Windows 11 won’t boot
by
goducks25
1 day, 17 hours ago -
Choosing virtual machine product for Windows on Mac
by
peterb
3 days, 14 hours ago -
Rest in Peace
by
Roy Lasris
4 days, 19 hours ago -
CISA : Install Windows March 2025 Updates until April 1 or shut down PC.
by
Alex5723
1 day, 17 hours ago -
Google proposes users with incompatible Win 11 PCs to migrate to ChromeOS Flex
by
Alex5723
4 days, 20 hours ago -
Drivers for Epson Perfection V600 Photo – scanner
by
Bookman
1 day, 11 hours ago -
Long Time Member
by
jackpet
4 days, 22 hours ago -
Woody Leonhard (1951–2025)
by
Will Fastie
16 hours, 26 minutes 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.