Discussion Locked

Program Code puzzle?

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am creating a database application in Access 2000, That will interact with Excel and Word. The problem area is when I transfer my recordset to an Excel Template.
The Steps are: User enters in a begin date and an end date, then clicks the transferbutton.
The first time the program does what it is suppose to, but if you close Excel and try to run a second report. Excell starts to open, it shows the top half of the window, but does not show the sheet, the report is created but not shown whenI click the X to close it it will ask if I want to save if I say yes and save it I can open the report in Excell (but not by double clicking the file).
What I have found out is If I open the code window (it does not show any code running) and clickthe reset button I can go back to the form and click the button to create the report and it will work one time, I reset it works. If you need to see the code I have a copy in Word, as it will not fit in this window

4 replies

by stillatit

It sounds like you are only going through the initialization code for Excel when you start the program, and not for each report. If you close Excel and do not restart your program, your programs pointers to the Excel object are lost. Try wrapping each report with the Excell initialization and Excell cleanup code.

Good luck.

by dennisbv

The 1st answer may be correct But I have no idea. I have very limited programing experiance. could you explain

This discussion is closed to new replies.