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.
我想将工作簿名称设置为一个变量,该变量由用户在用户表单 txtWBName 中指定
例如,
sWBName = userform1.txtWBName Set wb = Workbooks(" + sWBName + "): wb.Activate
我不太确定如何在“”之间编码它......
有人可以帮帮我吗。提前致谢。
您可以简单地传递变量名称,例如
Workbooks(sWBName)