Mac/PC是否有Application.GetOpenFilename的变体? [英] Is there a Mac/PC variant of Application.GetOpenFilename?

查看:299
本文介绍了Mac/PC是否有Application.GetOpenFilename的变体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有通用的操作系统变体?我希望在Mac和PC上使用此代码,但这似乎只能在PC上使用.

Is there a universal OS variant of this? I am looking to have this code work on a Mac and PC, but this seems only to work on a PC.

strFile = Application.GetOpenFilename("Text Files (.csv),.csv", , "Please selec text file...")

推荐答案

它在MAC(Excel 2011)中也有效.查看屏幕截图

It works in MAC (Excel 2011) As well. See screen shot

关注 在聊天中讨论时,我怀疑错误不是与Application.GetSaveAsFilename有关,而是其他原因.在这种情况下,它是Application.GetOpenFilename

FOLLOWUP Upon discussion in chat as I suspected the error was not with Application.GetSaveAsFilename but something else. In this case it was Application.GetOpenFilename

现在Application.GetOpenFilename在Mac中肯定会出现问题.我建议您查看该线程,它也可以解决您的问题.

Now Application.GetOpenFilename definitely gives a problem in Mac. I would recommend seeing this thread which also addresses your problem.

在VBA用户窗体中关闭已打开的工作簿时发生错误

这篇关于Mac/PC是否有Application.GetOpenFilename的变体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆