There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

My understanding is that the probability, p, of a win for the player can be expressed in terms of the house edge h.

h = house edge = (hands played - hands won by player)/(hands played) - 1/2

So if player wins half the hands dealt then house edge is 0.

p = (hands won by player)/(hands played)

So

h = 1/2 - p

Or

p = 1/2 - h

Given h, calculate p. Then we need a function, getResultOfHand(p), to return a win/loss or true/false based on probability p. This can be built using the random number generator. Say we generate a random number between 0 and 1. If the value is less than or equal to p we return true, else false.

I can tinker with this some more tomorrow. Perhaps you can see what you can come up with for the getResultOfHand(p) function in VBA.