APD Toronto
asked on
File Open Dialog under Win 7
Hi Experts,
I know that Set objDialog = CreateObject("UserAccounts .CommonDia log") no longer works under Win 7, so I came up with:
When I run this under Win 7 using VB6 it works, but when I convert it to .vbs and run it on the same machine, I get ActiveX can't create object: 'MSComDlg.CommonDialog'
I also downloaded an ran regsvr32 on both comdlg32.dll (failed) and comdlg32.ocx (passed)
What do I do?
I know that Set objDialog = CreateObject("UserAccounts
If XPmode = True Then
Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "Bank Downloaded Files (*.xls)|*.xls"
objDialog.FilterIndex = 1
objDialog.InitialDir = startupFolder
inFile = objDialog.ShowOpen
Set objDialog = Nothing
Else
Set objDialog = CreateObject("MSComDlg.CommonDialog")
objDialog.Filter = "Bank Downloaded Files (*.xls)|*.xls"
objDialog.InitDir = startupFolder
x = objDialog.ShowOpen()
inFile = objDialog.FileName
End If
When I run this under Win 7 using VB6 it works, but when I convert it to .vbs and run it on the same machine, I get ActiveX can't create object: 'MSComDlg.CommonDialog'
I also downloaded an ran regsvr32 on both comdlg32.dll (failed) and comdlg32.ocx (passed)
What do I do?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.