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.
是否可以使用workbooks.opentext方法以只读方式打开文本文件?当我在其他用户打开文件时尝试运行宏时,我收到消息“文件正在使用中”。
Opentext表达式中没有可用的readOnly选项;
OpenText(文件名、来源、开始行、数据类型、文本限定符、连续分隔符、制表符、分号、逗号、空格、其他、其他字符、字段信息、文本视觉布局、小数分隔符、千分隔符、尾随减号、本地)
同时,Worbooks.Open 方法提供了ReadOnly选项。
谢谢
而不是Workbooks.OpenText使用Workbooks.Open
Workbooks.OpenText
Workbooks.Open