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.
这一直说下标超出范围。有谁知道为什么?
(“连接”只是我放在那里的东西,所以我没有输入自己的连接)
我不相信下划线应该在那里。
尝试列出连接名称以确保您已准确提供它
Dim conn As WorkbookConnection For Each conn In ActiveWorkbook.Connections Debug.Print conn.Name Next conn
如果只有一个连接可以使用Connections(1),但最好使用名称。
Connections(1)