We recently migrated from XP/Office 2003 to W7/Office 2010.
We are running our projects as mdb under Access 2010.
Am testing a project and getting an error under Access 2010.
Think this is related to how defined Excel objects in the vba.
Am getting the error on the second record, so am thinking maybe did not "finish up" the previous row properly.
Yet cannot find the error. Hope you can help.
I work for a college. Once a year we send the instructors the course catalog description and detail about the course
for them to review and update. Any updates we data entry via a Web based system.
Am using Excel as a "report writer tool" and am hiding grid lines so that it looks like a report.
For each course-id-row read, the course id key is compared to the hold-key.
If there is a control-key break, then finish processing, and save the excel spreadsheet as a pdf.
The first course id, processed nicely, detected a new row, and went to finish off old key processing and creating a pdf.
When I process the second course id, am getting the error.
Below is uploaded:
1) test mdb:
2) xlt excel file template
please click on the form, mark 2 for how many to process, than click ok to process
You will see the first excel sheet create successfully
then the mdb will stop, if you go to the vba you will see the error.
First I had this:
1).Value = rst!Course
then changed to:
7").Value = rst!Course
Still getting error on second row.
When I click end, and then F5, it does ignore the error.
However, really want to solve the error so that the user does not have to hit F5 for a long time.
the Init New Key routine is here: c056_InitNewKey
The finish off old Key routine is here: c055_FinishOldKey
The objExcel objects are dimmed as Public here: 000_MyPublicConstants
thx so much for your help,