Hi all,
I am making an application to display and eventually analyse horse racing data (hopefully to save me time in the future) that I obtain from a Python web scraper that saves into a csv file(s). I have created a UserForm with a TreeView to display race courses and race times, which I plan to display the data in a ListView on child node click event, and then hope to create some magic to compare current race data with historical race data, and highlight positive and negative criteria by coloring cells appropriatly, so to analyse a race at a glance.
I am currently able to import the data into a new sheet from userform_initialize(), get the race course names to display as my parent nodes in the TreeView1, as well as the race times as my child nodes. I must say, ChatGPT has been awesome up until this point, where I would like to now sort the race time child nodes into ascending order, earliest to latest, but have been going round in circles for a couple of days now being hit with different error, usually somthing not found.
In the current version after the parent node Loop, the most succinct piece of code I have been working with is;
But for some reason it cannot find the .Sort method. When I write childNodes. Sort is not in the list. I can get Child or Children, or even sometimes Sorted, but none of these work, producing additional errors. childNodes.Child. doesn't work either as I assume the Child method doesnt have a sort method, although I think it has childNodes.Child.Add method, you'd have though it would have Sort!?
I'll attach my full project but have removed this section of code because for some reason it keeps going crazy when I try and save the workbook with this code commented out, and things keep disapearing.
If anyone can shed some light and point me in the right direction it would be very much appricated.
TIA
P.s. Just incase, FYI, I have made sure I have references checked in tools/references; MS Common controls, MS scripting runtime, MS VB for applications Extensibility 5.3. These are all solutions I found for my missing method problems, but none of them worked unfortunately.
Bookmarks