I searched and searched the internet and did not like the solutions I was seeing. Yes, I saw the Fisher-Yates Shuffle but its like greek to me. I wanted a simpler, easy to follow solution that was more how it would happen in the real world (ie. 14 ping pong balls in a jar that you shake up and you pull out 3 without looking. each one would be a different number). What I came up with is this.
Visual Basic baffles me a bit so maybe someone could come up with a more streamlined solution idk. The variable names obviously could be shortened.
' Converted the numbers to a text string so that each number could be 2 digits
' if the numbers were in the array as "1,2,3,4,5,6,7,8,9,10,11,12,13,14"
' then when the random number came up 1 the replace function would only
' strip the 1 from numbers 10,11,12,13 & 14 and would leave the number 1
' Added 00 as a number that will never be selected so the first number we
' do want to pick (ie. 01) will have a comma in front of it
' if the array started with 01,02,03 etc.) then the replace function
' would miss 01 as it does not have a comma in front of it
' Added +1 to the random number so that 00 is never picked
Randomize
Dim i1, i2, i3
dim myNumbersAsText1, myNumbersAsText2, myNumbersAsText3
Dim myarray1, myarray2, myarray3
dim mypick1, mypick2, mypick3
myNumbersAsText1 = "00,01,02,03,04,05,06,07,08,09,10,11,12,13,14"
myarray1 = split(myNumbersAsText1,",")
i1 = int(rnd*14)+1
mypick1 = CInt (myarray1(i1))
myNumbersAsText2 = Replace(myNumbersAsText1, "," & myarray1(i1), "")
myarray2 = split(myNumbersAsText2,",")
i2 = int(rnd*13)+1
mypick2 = CInt (myarray2(i2))
myNumbersAsText3 = Replace(myNumbersAsText2, "," & myarray2(i2), "")
myarray3 = split(myNumbersAsText3,",")
i3 = int(rnd*12)+1
mypick3 = CInt (myarray3(i3))
'**************************************************
'******* Everything below can be deleted **********
'******* it is just to show the results **********
'**************************************************
'turns an array into a string delimited by commas
Dim strText1, strText2, strText3
strText1 = join(myarray1,",")
strText2 = join(myarray2,",")
strText3 = join(myarray3,",")
msgbox strText1 & vbCRLF & i1 & " = " & myarray1(i1) & vbCRLF &_
strText2 & vbCRLF & i2 & " = " & myarray2(i2) & vbCRLF &_
strText3 & vbCRLF & i3 & " = " & myarray3(i3) & vbCRLF & vbCRLF & _
"Picked Numbers = " & mypick1 & ", " & mypick2 & ", " & mypick3