为什么我的宏中不存在 row() 函数?
该宏因编译错误而停止:
“子函数或函数未定义”
并且 Row
突出显示。
我正在使用 Microsoft Excel for Microsoft 365。
Sub test()
Range(Address(Row(), Column()) & ":" & Address(Row(), Column() + 5)).Select
End Sub
This macro is stopping with a compile error:
"sub or function not defined"
and Row
is highlighted.
I am using Microsoft Excel for Microsoft 365.
Sub test()
Range(Address(Row(), Column()) & ":" & Address(Row(), Column() + 5)).Select
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
作为您的子例程,
test
不在电子表格中,因此不会定义该函数。您可能对行属性感兴趣范围。As your sub-routine,
test
, isn't in a spreadsheet it wouldn't have the function defined. You might be interested in the Row attribute of Range.这样的东西也许。
请查看下面的链接,以获取更多信息。
https://www.thespreadsheetguru.com/blog/2014/7/7/7/5-different-ways-ways-to-find-to-find-the-the-last-the-last-the-last-row----------------------------------------vba < /a>
Something like this, maybe.
Check out the link below, for more info.
https://www.thespreadsheetguru.com/blog/2014/7/7/5-different-ways-to-find-the-last-row-or-last-column-using-vba
谢谢大家!研究您的评论非常有教育意义。尤其是 CBasic2008 的提示让我走上了正确的道路。我想做的是:
Thank you All! Researching your comments was very educational. The tips from CBasic2008, especially, put me on the right track. What I was trying to do was this: