我使用VBA操作Excel,使用CommonDialog来打开一个打开一个文件
Dim CommonDialog1 As CommonDialog
Set CommonDialog1 = New CommonDialog
CommonDialog1.cancelerror = False
CommonDialog1.Filter = "CSV File(*.CSV)"
CommonDialog1.Flags = &H10&
CommonDialog1.ShowOpen 但问题是在我的机器上能过使用,但有的机器上不能过使用,出现的错误信息是:
RunTime error (429): ActiveX component Can't create object
那位大哥给出点注意,谢谢
Dim CommonDialog1 As CommonDialog
Set CommonDialog1 = New CommonDialog
CommonDialog1.cancelerror = False
CommonDialog1.Filter = "CSV File(*.CSV)"
CommonDialog1.Flags = &H10&
CommonDialog1.ShowOpen 但问题是在我的机器上能过使用,但有的机器上不能过使用,出现的错误信息是:
RunTime error (429): ActiveX component Can't create object
那位大哥给出点注意,谢谢
Microsoft Visual Basic 6.0 中文版工具------Package & Deployment 向导
到别的机器再安装
建议作成安装文件
Dim strFileName As Variant
strFileName = Application.GetOpenFilename("txtファイル,*.txt")
If strFileName = False Then '文件不存在
Exit Sub
else
MsgBox strFileName
End If
谢谢大家