DataWindow SaveAs Dialogue Box in PB 2017


Hi guys,

We have upgraded to 2017 and the users have noticed that the DataWindow SaveAs dialogue box (invoked by the data window SaveAs method) has changed from our previous installation under 12.6. 

They don't like the new one !!

As far as I am aware this is just a built in and there is no way of customising the dialogue box.

Is this just something that has changed in PB 2017 or am I missing something?

See below for screenshots from 2017 and 12.6.

PB 2017:

PB 12.6:



Question Tags: 


Marco Meoni answered DataWindow SaveAs Dialogue Box in PB 2017


Hi Gordon,

that indeed seems to be the old Explorer-style Save As, which was superseded by the Common Item Dialog. Dunno why the new PB2017 has brought it back, but you can work around as follows:

li_rc = GetFileSaveName ( "Select File", ls_path, ls_file, "TXT", "Text with headers (*.txt),*.txt" , "", 32770)
IF li_rc <> 1 Then Return
dw_1.SaveAs (ls_path, Text!, True)



Marco's picture

Thanks Marco, this helped a lot. 

I needed to give the users a couple of file type options so I ended up with the following:

li_rc = GetFileSaveName ( "Save As", ls_path, ls_file, "", "Excel12 with headers (*.xlsx),*.xlsx,Text with headers (*.txt),*.txt, CSV with headers (*.csv),*.csv" , "", 32770)
If li_rc <> 1 Then Return
If Pos(ls_file, ".") = 0 Then Return
ls_extension = Upper(Mid(ls_file,LastPos(ls_file,".")+1))
Choose Case ls_extension
   Case "XLSX"
   Case "TXT"  
   Case "CSV"
End Choose