如果特定范围的外部链接更改,请调用宏
由于外部链接,我偶尔会在工作表中更新信息。当该特定行(最后一行)具有计算更改时,我需要将表中的最后一行复制到另一个表。
我使用Worksheet_calculate进行扫描,看看整个表格中是否有任何计算更改,但需要指定范围。代码如下所示,
Private Sub Worksheet_Calculate(ByVal target As Range)
Dim rWatchRange As Range
Set rWatchRange = Range("A10:K10")
If Not Application.Intersect(target, rWatchRange) Is Nothing Then
Call Update
End If
End Sub
我会收到编译错误:过程声明与具有相同名称的事件或过程的描述不匹配。
私有子工作表_CALCULATE(BYVAL目标作为范围)
有人可以帮助我向我解释如何解决此问题?
I have information updating to a table in my sheet occasionally due to external links. I need to copy the last line in my table over to another table when that specific row (the last row) has a calculation change.
I use the Worksheet_Calculate to scan and see if there was any calculation change within the whole sheet, but need to specify range. The code is shown below
Private Sub Worksheet_Calculate(ByVal target As Range)
Dim rWatchRange As Range
Set rWatchRange = Range("A10:K10")
If Not Application.Intersect(target, rWatchRange) Is Nothing Then
Call Update
End If
End Sub
I'm getting a Compile Error: Procedure declaration does not match description of event or procedure having the same name.
Private Sub Worksheet_Calculate(ByVal target As Range)
Could someone please help explain to me how to fix this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论