I have the following code:
On Error GoTo Waitforpdfcreator Try_Again: Name zBillPath & "rptAnnualBilling.pdf" As _ zBillPath & "Bill" & Format(rst![OwnerID]) & ".pdf" On Error GoTo 0 . . . GoTo GetOut Waitforpdfcreator: Resume Try_Again
The purpose of this code is to wait until PDFCreator creates a PDF file from an Access report so I can successfully rename it, since the next iteration will create the report with the same file name. The question is do you know a better method of making VBA wait until the .PDF file is created before it continues?
PS. The code works fine it just seems very inelegant!