Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Open File Dialog that Works with Win7

Hello there! The old open file dialog that I used with QLikView no longer works on Win7. The sub used "MSComDlg.CommonDialog" and this was the code for the Sub.

' Sub to show open/save dialog
SUB OpenSave (varOpenSaveInputBox, varOpenSaveType, varOpenSaveFilter)  
  
' Create object
  
SET objComDlg32 = CreateObject("MSComDlg.CommonDialog")
  
' Set memory buffer
   objComDlg32
.MaxFileSize = 260
  
' Set filter
   objComDlg32
.Filter = varOpenSaveFilter
  
' Show dialog
  
IF varOpenSaveType = 0 Then
      objComDlg32
.ShowOpen
  
ELSE
      objComDlg32
.ShowSave
  
End IF   
  
' Get filename from dialog
   strOpenSave
= objComDlg32.FileName
  
' Check IF dialog is cancelled
  
IF strOpenSave <> vbNullString Then
     
' Set to variable
      objOpenSave
.SetContent strOpenSave, TRUE
  
End If
END SUB

Can anyone suggest an open file dialog that works? Thanks.

2 Replies
Anonymous
Not applicable
Author

I've not tried this before, but this post (http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/bd96d326-59f2-42b0-b04d-4ed65c4ce692) suggests it may be necessary to register MSCOMDLG32.OCX, albeit for Vista.

Not applicable
Author

Yes it might work in a 32-bit system but my win7 is 64-bit. I have tried this before.