<< Click to Display Table of Contents >>
Exporting |
For users to select a name and a directory to generate a file, let's open a dialog box.
1.On the AlarmScreen, insert a Command Button and change its Caption property to "Export".
2.Create the next script.
'Export
If Application.ShowFilePicker(False, FileName,"pdf", _
128, "PDF Files|*.pdf|All Files|*.*") Then
Set Report = Application.LoadReport("AlarmReport")
Report.Export "PDF", FileName
End If
3.The previous script opens a dialog box that allows filtering by files with the .pdf extension or by files with any extension, according to the next figure.
File filters
4.Test this new application's functionality.