-
Lo all, only just found this site using altavista.
Basically i am writing a program which will show football league tables using text boxes, and an OLE from Excel which has the basic details of the teams points etc.
I have been able to do that fine however I can't seem to be able to think of the code or find the code which will be able to sort the records within the objExcel.
So what I am trying to get to happen is that when you click on a command (in this case cmdShowNew) it will sort the records within my excel OLE and put them in alphabetical order. The field which I want to sort is the first field and starts from record 2 i.e the field has a title in this case TEAMS, and i want to sort the records which start in A2 to A7 (I've got 6 teams within my league)
If any1 could help that would be extremely grateful.
-
Gudday Joe,
Ok it would appear that you have sorted getting an excel object through vb. To sort on a field, don't have vb in front of me to look up the code :(, open the excel spreadsheet and start a marco recording, do your normal actions to sort by column, then stop the macro recording, (will ask for a name). Then simply look through the vba code produced. VB will be able to replicate this through the excel object properties, just code it in a routine. :)
This is how l am learning to manipulate excel. If any problems email me at [email protected] and l will do it on one of the office machines and send ya the code.