映射“名称”到一个范围
我为列范围设置了一个“名称”,我想稍后引用它:
Dim r As Range
r = Application.Names("Changes").Something
我已经尝试了一堆“某事”,但无法得到正确的结果。谢谢。
I setup a "Name" to a column range, and I want to reference it later on:
Dim r As Range
r = Application.Names("Changes").Something
I've tried a bunch of "Something" but cannot get this right. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
“Set”关键字非常重要。
这适用于任何尺寸范围,包括单个细胞。
然后您可以访问范围变量“r”的属性和方法。
The 'Set' keyword is very important.
This will work for any size range, including a single cell.
Then you can access the properties and methods of your range variable 'r'.
尝试:
Try:
RefersTo 或 RefersToRange 是否有效?
Do either RefersTo or RefersToRange work?
这有用吗?
我认为只有当范围是 2 个或更多单元格时它才有效。如果是的话,你必须做其他事情……但不太记得了。
另一种方式如下。
does this work?
I think it will only work if the range is 2 cells or more. If it is one you have to do something else...don't really remember though.
Another way is as follows.