Jak*_*ake 7 excel vba excel-vba
是否有任何变量可以提供工作表和单元格来接收自定义VBA函数的结果?
例如,如果A!B1公式=MyCustomFunc()在我的代码中:
public function MyCustomFunc()
'what can I call here to get the values "A" and "B1"?
end function
Run Code Online (Sandbox Code Playgroud)
这是你在尝试什么?
Option Explicit
Public Function MyCustomFunc()
'~~> Judicious use of 'Volatile' is advised.
'~~> This will be called everytime the sheet is recalculated
Application.Volatile
MsgBox Application.Caller.Parent.Name & ", " & Application.Caller.Address
End Function
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7309 次 |
| 最近记录: |