vb6 insert data into excel from database : I have been looking for a solution to inserting data into excel using vb6 code and access database. There are many cases where I need to write to an excel spreadsheet multiple times with different records of data. I have an existing workbook that I am trying to open and save as when I am complete. so far I have been able to open the excel workbook, target the sheet, and the cells I am writing to, however I can only write to the workbook once and when I leave the scope of the open workbook the connection is gone.

I think i need to build some sort of dictionary so I can store multiple records from the Datasource, but i am just not sure. I can share the current code I have but I didn't know if it would be much help here. So if i have multiple works it will loop through the workbook connection until there are no more records to go through. And a sub routine that creates the workbook object, opens the existing workbook and work sheet, rights to a specified cell number to insert the new data. I have looked at https://support.microsoft.com/en-us/help/247412/methods-for-transferring-data-to-excel-from-visual-basic and it don't seem to have what I am looking for at this time.

Am I making this to complicated or is there a solution for this? Please help. If I need to I will post the code.