Hiya Ajay

You really need to get away from this idea of putting each of the data cells in the flexgrid into an excel cell. It is very bad practice!

You are moving items around in memory way too much and it will be time consuming to say nothing of the least.

The best way, and I can only speak from working with huge data feeds, is to create an array as I gave you. Work within VB to do the majority of effort and then farm it out to the excel sheet once you have all of the data. It will be far more reliable and wont require you to have to use fancy methods of working out the name of the cell. It is good to experiment I do agree, but trust me on this one....it is the most satisfying way of just put the data from array into the excel spreadsheet in one line. Sometimes less is more The other reason, is that if the model was to expand...you will need to write a much longer algorithm to cope with the AA, AB, AC etc

If you are going to open and close the spreadsheet for each module then you don't need to declare the objects at a modular level....just procedural.

How long is the form going to be open for? If it isn't a long time then why shut Excel down? At the very least keep the App alive, and if you want to close the workbook down then fair enough....but unless someone else will need access to it, then don't bother.

So my advice would be to open up the excel objects at the top of the load procedure, and close the excel objects at the bottom of the unload.

You don't need to add the visible=false in as it is non-visible by default. I only stuck it there so when testing, if it fails, you don't end up with 30 instances of excel in memory.

At the beginning use the TextMatrix to set the top line of your FlexGrid, rather than set each col number. If you were setting colours for the cells then you would have no choice, but it will be less code, also the next lines are using the FlexGrid, but you have left them out of the with statement.

With regards to the save...you arent being consistent with your open statement. Use the const m_csFileName you set up throughout. The reason I used the SaveChanges:=True is at the end, it closes down the workbook and saves any changes made to the sheet. You are keeping the same workbook and effectively using it as a data source. So there is no need to change the name or location of the workbook?

By using the saveas...it will prompt a question as you are now overwriting an existing workbook, albeit one you have open! In this instance there is no need to use this method...but otherwise if this was causing a problem you would use the application.displayalerts=false. That would suppress the warning.

Sorry to rip into your code....it isn't intentional...it good to experiment otherwise you don't know what does and doesn't work!

Good luck!