That article is unnecessarily verbose. I imagine it causing more confusion than clarity.
I can't read VB very well, but I noticed another issue.
Private Structure Node
Dim NodeX, NodeY As Integer 'the location of this node
Dim ParentX, ParentY As Integer 'the location of this nodes parent
Dim ParentG As Integer 'the G score of the parent cell
Dim F, G, H As Integer
If Not OpenList.Contains(TempNode) _
And Not ClosedList.Contains(TempNode) Then _
OpenList.Add(TempNode)
These two don't work together. The OpenList and ClosedList shouldn't store nodes, they should store states. In a purely positional A-Star search, each state is described solely by a position, (x,y).
Nodes are wrappers to store states in a search-graph. Parents and path-cost and heuristic values are NOT a part of the state, but we put them in a node to make a meaningfully connected graph. ClosedList.contains(someNode) is including the parentx, parenty, F, G and H values as a single value-type in the comparison for duplicate values. This is not correct. You'll end up duplicating states with different F,G,H and parent values.
The Node should simply be a wrapper to the state with a pointer (reference data-type) to the parent. That's why node should be a class and state should be a struct. IE-
Structure State
dim x,y as integer
Class Node
dim parent as Node
dim self as State
dim F, G, H as Integer
' no clue if this is proper syntax or not
To help you out- you may want to consider using a PriorityQueue and a Set (in the form of a Hash or Dictionary). I found a straightforward VBasic priority queue implementation -
http://www.vb-helper.com/howto_net_generic_priority_queue.html (though you should implement it as a heap instead of lists, but whatever--VB might automagically optimize stuff or something).
Now, instead of putting nodes into your openList, you just put states. Your closedList can then be a dictionary, where the state is a key and the Node is a value. If the key doesn't exist, then we know the state has never been discovered (and in order of constant-time!).
When it's time to pop the best state off the openList, you can easily fetch the Node by passing the state into the dictionary.
Anyhow, good luck.