Can anyone help !
My task is quite easy (or should be), all I want to to do is to add a worksheet to an Excel workbook - but after all existing sheets.
It is easy enough to add a sheet in the default position - before the active sheet using;
m.oleapp.activeworkbook.worksheets.add()
The thing is I need to use arguements to the add method, but I don't need the first ("before"
argument, in theory I should just leave it blank;
m.oleapp.activeworkbook.worksheets.add(,m.sheet_count,1,-4167)
where m.sheet_count is the (already established) number of sheets in the workbook but this causes Excel to generate an error, I've tried NULL, a space and a few other things besides - nothing works - it must be possible somehow !
Thanks
My task is quite easy (or should be), all I want to to do is to add a worksheet to an Excel workbook - but after all existing sheets.
It is easy enough to add a sheet in the default position - before the active sheet using;
m.oleapp.activeworkbook.worksheets.add()
The thing is I need to use arguements to the add method, but I don't need the first ("before"
m.oleapp.activeworkbook.worksheets.add(,m.sheet_count,1,-4167)
where m.sheet_count is the (already established) number of sheets in the workbook but this causes Excel to generate an error, I've tried NULL, a space and a few other things besides - nothing works - it must be possible somehow !
Thanks