Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
jonbrough
Not applicable

Re: Open File Dialog that Works with Win7

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

Re: Open File Dialog that Works with Win7

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