Private Sub Command1_Click()
Dim mCob As New CommonDialog
Dim mFileName As String
With mCod
.DialogTitle = "打开Exe应用程序"
.Filter = "应用程序 (*.exe)|*.exe"
.ShowOpen
mFileName = .FileName '返回选择的应用程序名
End With
End Sub运行后,弹出错误:编译错误,无效使用new关键字。
Dim mCob As New CommonDialog
Dim mFileName As String
With mCod
.DialogTitle = "打开Exe应用程序"
.Filter = "应用程序 (*.exe)|*.exe"
.ShowOpen
mFileName = .FileName '返回选择的应用程序名
End With
End Sub运行后,弹出错误:编译错误,无效使用new关键字。
解决方案 »
- 请进来看看这个模块里的是什么内容呢(ACCESS有关)
- 我的vb程序在运行时需要重新调用一个驱动的安装程序,但安装程序会弹出两个选择窗口,怎么样模拟键盘输入,去掉窗口,让安装程序不需人工按键,能够完成??
- The VB Application identified by the event source
- 我的DTPicker控件怎么不能显示日期了,效果是“2004年10月日”
- vb如何连接到网络中的access数据库??初学者请说详细一点!!!!(高分!)
- 如何设置check.value的属性?
- 怎样用ADO判断一个Access数据库有没有加密码?
- 如何设置一个报表(包含多张)?在线等待!急急!!!
- 有两个API不懂向各位请教
- 不用DATAENVIRONMENT 打印报表DATAREPORT
- 打开工程不能加载msadodc.ocx,怎么办?
- vb 如何实现ping测(同时PIng多台主机)并取回lost和loos值
'Dim mCob As New CommonDialog
Dim mCod As Object
Set mCod = CreateObject("MSComDlg.CommonDialog")
Dim mFileName As String
With mCod
.DialogTitle = "打开Exe应用程序"
.Filter = "应用程序 (*.exe)|*.exe"
.ShowOpen
mFileName = .FileName '返回选择的应用程序名
End With
End Sub