Davidprince
Programmer
Ladies and Gentlemen
I have an array of letters, after having set up data on an Excel spreadsheet. Copied the array into VBA as normal and have been able to count the number of times each letter occurs and display this on the spreadsheet. The data looks like this:
Letter a b c d e f g h i
e 1
d 1
h 1
d 2
This is a friends betting system, which I am hoping to prove is quite useless (my manual tests so far indicate it works...which can't be correct, so I am trying to automate it and want to run 10,000 or 20,000 samples).
Back to the data. When one group takes over (in the data d is now in front of e), he bets on that letter. When the group wins, he restarts. My problem is in the restarting and I have looked at passing the array to a function or a subroutine without success (very rusty on VB). I have also looked at looping, but would prefer the structure of passing the array as it is easier to follow (no doubt my friend will want to amend his ideas down the track).
Suggestions on reference material on passing arrays to subroutines and functions would also be helpful.
Cheers
David
I have an array of letters, after having set up data on an Excel spreadsheet. Copied the array into VBA as normal and have been able to count the number of times each letter occurs and display this on the spreadsheet. The data looks like this:
Letter a b c d e f g h i
e 1
d 1
h 1
d 2
This is a friends betting system, which I am hoping to prove is quite useless (my manual tests so far indicate it works...which can't be correct, so I am trying to automate it and want to run 10,000 or 20,000 samples).
Back to the data. When one group takes over (in the data d is now in front of e), he bets on that letter. When the group wins, he restarts. My problem is in the restarting and I have looked at passing the array to a function or a subroutine without success (very rusty on VB). I have also looked at looping, but would prefer the structure of passing the array as it is easier to follow (no doubt my friend will want to amend his ideas down the track).
Suggestions on reference material on passing arrays to subroutines and functions would also be helpful.
Cheers
David