Export data to Excel worksheet

accessman2

Registered User.
Local time
Yesterday, 19:33
Joined
Sep 15, 2005
Messages
335
Hi,

I used this way to export data to Excel worksheets, and do some formatting on the Excel sheet

Set objXL = CreateObject("Excel.Application")
objXL.Application.Workbooks.Add
Set objActiveWkb = objXL.Application.ActiveWorkBook
................

It works fine. I have a question.
When I run the function, suppose it takes 15 mins to export data because there are many records and calculations. During the 15 mins, if the user open the Excel file, it will break the process of export data to Excel from MS Access. So, how can I prevent the user break the process/prevent the user to open Excel worksheet?
 
Use
Code:
Set appExcel = New Excel.Application
appExcel.Visible = False
It works a lot faster too. Don't forget to show it when you're done.
 

Users who are viewing this thread

Back
Top Bottom