Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将多个变量传递给按钮的 .OnAction 调用。我无法找到与多个变量相关的答案,我可以只用一个变量来完成。这是我拥有的适用于一个变量的内容:
shpBar.OnAction = "'Button_Click """ & strText & """'"
如何向其中添加两个其他变量(例如 VarA 和 VarB)?
假设 VarA 和 VarB 是变体或数值变量,这将起作用:
.OnAction = "'Button_Click """ & strText & """," & varA & "," & varB & " '"
如果它们是字符串,则需要在每个变量名称周围再添加两个双引号。
.OnAction = "'Button_Click """ & strText & """,""" & varA & """,""" & varB & """ '"