I think you should change the call to CheckCells from the SaveAsPDF routine
currently you have
replace the highlighted part by![]()
Sub SaveAsPDF() Call Checkcells.emptycell Dim fname As String Dim wb As Workbook
![]()
'# declare dim returnval as boolean '# call the routine to check if all cells have been filled, if not returnval is returned as TRUE call emptycell(returnval) '# exit the routine (i.e. do not create the PDF) if one or more fields were foudn to be empty If returnval then exit sub end if
Bookmarks