I have a program that creates an ini file and then uses that file to automatically generate the PDF file to the determined filename and location. It works great! The problem is, I need to delete the ini file when complete.
In VB, the file delete is happening prior to the PDF file generation, because file functions happen faster, I assume. I've looked into timer controls, but since this is all in a module I have no form to put them on.
The code below mioght work, except that the system has no idea what sleep does. Apparently, this is not a predefined command.
Any thoughts on this matter would be greatly appreciated.
Public Sub Delay(pdblSeconds As Double)
Const OneSecond As Double = 1# / (1440# * 60#)
Dim dblWaitUntil As Date
Do Until Now > dblWaitUntil