[英]Excel VBA: Selecting a Range with an arbitrary amount of Rows, but set columns
I'm sure this will be something simple, but I haven't been able to find anything. 我敢肯定这很简单,但是我什么也找不到。 I have this:
我有这个:
If Not Intersect(Target, Range("AM8:BA")) Is Nothing Then
And then I have the rest of my code with actions. 然后,我将剩下的代码与操作结合在一起。 I'm trying to have my macro trigger if any of the cells in that range are changed.
如果该范围内的任何单元格都被更改,我正在尝试宏触发。 I get a syntax error at the BA part.
我在BA部分收到语法错误。 What I'm trying to do is have the range work for any arbitrary amount of rows after 8 in column AM-BA.
我想做的是使AM-BA列中8之后的任意行数的范围工作。 Ex: BA50, BA1000, etc
例如:BA50,BA1000等
I'm sure it's a simple mistake, but I can't find it anywhere. 我敢肯定这是一个简单的错误,但是在任何地方都找不到。 Thanks in advance
提前致谢
考虑:
If Not Intersect(Target, Range("AM8:BA" & Rows.Count)) Is Nothing Then
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.