I have this litle problem:
I have inserted a lot of data into a excel form. After that I wish to do a bit of sorting and all that stuf before I actually create a chart. So I used the subtotal routine.
Somehow this routine ignores my first row of data. Very well, I'll let it start at one row higher. But excel drops a messagebox to tell me this row doesn't contain any data. (hey tell me) and I have to push the "OK"button to continu.
I wonder, is there a method to programaticaly push the "OK" button so my litle program can continu without me sitting on the watch?
The code looks like this:
oRng = oSheet.Range("F4", "F" & einde + 4 & "")
oRng.Select()
oRng.Copy()
PRang = oSheet.Range("AA4", "AA" & einde + 4 & "")
PRang.PasteSpecial()
oRng = oSheet.Range("I4", "I" & einde + 4 & "")
oRng.Select()
oRng.Copy()
PRang = oSheet.Range("AB4", "AB" & einde + 4 & "")
PRang.PasteSpecial()
oRng = oSheet.Range("AA3", "AB" & einde + 4 & "")
oRng.Select()
oRng.Subtotal(1, Excel.XlConsolidationFunction.xlSum, 2, True, False, True)
Anyway, thanks in advance.