Hi Guys, how can i add a line under line xlbottomedge after rsCount
Then the very next Excel row (rs.Count + 1) = "TOTALS"
Then column
popen, psave, fopen and fsave are all strings (path open, File open etc)
Below is what i have got but doesnt add the totals to excel on the next row after count ???
Sorry for being naive, i can get quite a lot working but loose myself doing it
Code:
Set ApXL = CreateObject("Excel.Application")
Set xlWB = ApXL.Workbooks.Open(pOpen & fOpen)
ApXL.ActiveWorkbook.SaveAs pSave & fSave
ApXL.Workbooks.Open pSave & fSave, True, False
ApXL.Visible = False
With xlWB
.Worksheets(1).Cells(6, 2).CopyFromRecordset rs
.Worksheets(1).Cells(rs.RecordCount, 2) = "TOTALS" 'new
.Worksheets(1).Cells(rs.RecordCount + 1, 5) = TotalNett 'new
.Worksheets(1).Cells(rs.RecordCount + 1, 6) = TotalVat 'new
.Worksheets(1).Cells(rs.RecordCount + 1, 7) = TotalAll 'New