Hey fellas, so the idea here is doing a sort of a giant set of data in a seperate workbook. Leading up to this point in the code we have xlSht defined as a sheet object, getXcoX is an integer. Last is a little routine to get the desired endpoint. I know for a fact that xlSht and getXcoX are valid since they are used earlier in the program.
It errors out on the last line with the following message:
Runtime error '- 2147417851 (80010105):
Automation error
the server threw an exception
A google search didn't reveal any information about the runtime error with anything related to excel or within my comprehension. Anyone got a clue what that means? I would really like to avoid writing my own sorting algorithim
EDIT: Before anyone stsarts working on this, I think I am an idiot. The Range(Cells(1,getXcoX).address) thing isn't working properly. Don't think too hard on this guy
Code:
xlSht.Activate
xlSht.Columns("A:M").Select
listMax = last(getXcoX, xlSht)
'Sorting bit
xlSht.Sort.SortFields.Clear
xlSht.Sort.SortFields.Add Key:=Range(Cells(1, getXcoX).Address), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
It errors out on the last line with the following message:
Runtime error '- 2147417851 (80010105):
Automation error
the server threw an exception
A google search didn't reveal any information about the runtime error with anything related to excel or within my comprehension. Anyone got a clue what that means? I would really like to avoid writing my own sorting algorithim
EDIT: Before anyone stsarts working on this, I think I am an idiot. The Range(Cells(1,getXcoX).address) thing isn't working properly. Don't think too hard on this guy
Last edited: