Printing in Excel via VB6.0
Posted on 2000-04-04
Here's my problem....
* Main *
Call Checkreport (.....)
Public Sub Checkreport (...)
' does a bunch of things to get workbook and worksheet information
Call ReportPrint 't print excel reports
Public Sub ReportPrint (....)
'uses Create Object to open an instance of Excel
' it prints the excel worksheet (specific one from a workbook)
' then closes the excel instance and relese all objects
The CheckReport subroutine loops through a file to collect filenames
for printing so each file it finds, it send to ReportPrint to print the file.
When I run it,it has no problems printing the first file, but then it doesn't print any other files after that!!! I think it goes through too fast for excel to process... what can I do to fix the problem... how can I force the program to wait for the excel to close/quit before sending the nex printjob??? Is there a better way to approachthe problem??
I hope I made the question clear... pleas let me know if more clarification is needed...
Azurix North America