I don't think I've ever used the FFC common dialogs but I'm doing some updates to an old system and thought I'd try it instead of the old PUTFILE().

Here's my code:

m.lcXLSFile = ""
THISFORM._COMDLG.nHwndOwner = _SCREEN.Hwnd

THISFORM._COMDLG.cTitlebarText = "Export to Excel"

THISFORM._COMDLG.cFileName = ALLTRIM(THISFORM.cboTable.Value + " Audit " + TTOC(DATETIME()))
THISFORM._COMDLG.cDefaultExtension = "xlsx"
THISFORM._COMDLG.cInitialDirectory = This.GetMyDocumentsPath()

THISFORM._COMDLG.AddFilter('My Excel files", "*.XLSX;*.XLS;')

THISFORM._COMDLG.lSaveDialog = .t.

THISFORM._COMDLG.ShowDialog()    &&PUTFILE("Export to Excel:", m.lcXLSFile, "XLSX")

IF THISFORM._COMDLG.nfilecount = 1
    m.lcXLSFile = ADDBS(thisform._coMDLG.cfilepath) + thisform._coMDLG.cfilename
ENDIF


Which is basically a copy and paste of the code from the getfilex.scx in the Samples\Solution\ffc\ folder

The problem is that the dialog is never displayed. If I run the GetFile form it displays fine. Can anyone see what I'm missing?

--

Frank.

Frank Cazabon


Reply via email to