运行时错误 '429' ActiveX 部件不能创建对象
Set objDialog = CreateObject("UserAccounts.CommonDialog")
解决办法

Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "Access文件(*.mdb)|*.mdb|所有文件(*.*)|*.*"
blnFile = objDialog.ShowOpen
If blnFile Then
strLoadFile = objDialog.Filename
'MsgBox strLoadFile
End If
Set objDialog = Nothing
替换为
Dim IE: Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = False
.Navigate ("about:blank")
Do Until .ReadyState = 4: Loop
With .Document
.Write "<html><body><input id='f' type='file'></body></html>"
With .All.f
.Focus
.Click
strLoadFile = .Value
End With
End With
.Quit
End With
Set IE = Nothing

参考文档
http://www.cnblogs.com/abinxm/archive/2010/06/21/1762028.html

http://wangye.org/blog/archives/551/

IE需要设置:
工具 – Internet选项 – 安全 – 自定义级别 – 找到“其他”中的“将本地文件上载至服务器时包含本地目录路径”,选中“启用”即可。

最新文章

  1. 安卓自定义组合控件--toolbar
  2. css实现小三角(原理)
  3. PHP 可变长度参数列表
  4. 在MACOS上实现交叉编译
  5. #pragma section
  6. 4.跟我学solr---SolrRequestHandler具体解释
  7. MC34063+MOSFET扩流 12V-5V 折腾出了高效率电路(转)
  8. 在Spring MVC Controller的同一个方法中,根据App还是WEB返回JSON或者HTML视图。
  9. 11.并发包阻塞队列之LinkedBlockingQueue
  10. String类的简要概述(1)
  11. 使用newtonsoft序列化
  12. (hdu)4858 项目管理 (vector)
  13. Python列表操作集合
  14. (计算几何 线段判交) 51nod1264 线段相交
  15. Codeforces 1045G AI robots [CDQ分治]
  16. 关于SUID SGID
  17. [cb]ScriptableWizard 创建向导
  18. ASP.NET MVC 4 中的JSON数据交互
  19. SparkContext.union 与 RDD.union
  20. LeetCode——12. Integer to Roman

热门文章

  1. C# Lock 解读[转]
  2. ArrayBlockingQueue跟LinkedBlockingQueue的区别
  3. MySQL 表与字段编码格式报错
  4. yii2.0 网址重写
  5. Oracle中用户的基本操作
  6. PHP5与MySQL数据库操作
  7. 学习OpenCV——Gabor函数的应用
  8. 学习OpenCV——HOG+SVM
  9. Eclipse中使用自己封装的jar包的过程
  10. android 多点