doran_doran
Registered User.
- Local time
- Today, 06:20
- Joined
- Aug 15, 2002
- Messages
- 349
Hi,
I am using following code to export PDF and it's working fine.
1. How do I prompt for location ? (like what drive or directory to save, end user will nagivate this)
2. How do I prompt a Msgbox "No data to print" if there is nothing to print.
Thanks
= = = = Working Code = = = =
Private Sub cmdSaveReportAsPDF_Click()
If ValidateRptData() = True Then
Dim ReportName As String
Dim FileName As String
Dim DateToday As Date
DateToday = Date
ReportName = "rptNP_Main"
FileName = ReportName & " - " & Format(DateToday, "mm-dd-yyyy") & ".pdf"
Call SaveReportAsPDF("rptNP_Main", FileName)
MsgBox "Export completed"
End If
End Sub
I am using following code to export PDF and it's working fine.
1. How do I prompt for location ? (like what drive or directory to save, end user will nagivate this)
2. How do I prompt a Msgbox "No data to print" if there is nothing to print.
Thanks
= = = = Working Code = = = =
Private Sub cmdSaveReportAsPDF_Click()
If ValidateRptData() = True Then
Dim ReportName As String
Dim FileName As String
Dim DateToday As Date
DateToday = Date
ReportName = "rptNP_Main"
FileName = ReportName & " - " & Format(DateToday, "mm-dd-yyyy") & ".pdf"
Call SaveReportAsPDF("rptNP_Main", FileName)
MsgBox "Export completed"
End If
End Sub