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.
我在服务器端有 myfile.xlsm 格式文件作为只读文件,因为我写了一些 VBA 到 excel 中的文件列。当客户端访问该文件时,我只是显示填充的文件。虽然客户端倾向于保存文件,但它会保存到另存为因为它是只读的。它在客户端保存为 myfile.xlsm。现在我的问题是:)
如果客户端倾向于从 saveas 选项保存文件,则假设仅将 myfile.xlsx 格式保存为普通 xml 文件而不是启用宏的文件。
我必须在 VBA 中做什么才能执行此操作(可能是在保存事件之前写一些东西)..??
我创建了一个私有方法并添加了这一行`ActiveWorkbook.SaveAs Filename:="Formula.xlsx", FileFormat:=xlOpenXMLWorkbook`并调用此方法.. 哈它有效!