Visit my site and take a look at one I programmed in Excel. No funny business there, only random (as far as Excel's RNG is random) numbers, although the bet/payout routine has to be specifically coded for whatever it is you're trying to do. All of the code is viewable.
If you're already comfortable programming with VBA then everything there should be pretty clear. If not, but you're up for learning, I've put in a system that simply bets on a split number on every occasion - as an example of how to code the bets, and then the payoffs if a winning number results.
I learned to code doing something similar.