Currently I populate one excel spreadsheet with data from lots of different tables.
What I would like to do is say....populate one set of data into Sheet 1 and then change to a another Sheet...say Sheet 2 keeping my connection to that workbook open when I do this.
Is there away?
Cheers Will
eg:
What I would like to do is say....populate one set of data into Sheet 1 and then change to a another Sheet...say Sheet 2 keeping my connection to that workbook open when I do this.
Is there away?
Cheers Will
eg:
Code:
Set objXL = CreateObject("Excel.Application") 'Start application
Set objXLWrkBk = objXL.workbooks.Open(strSaveAs) 'XLS file which will be used
Set objXLWrkSht = objXLWrkBk.worksheets("Sheet2")
'Populate cells for Sheet 1 then switch to Sheet 2
Set objXLWrkSht = objXLWrkBk.worksheets("Sheet2")
'Populate cells for Sheet 2