Question: Mark 6 is a lottery game that draws unique balls out of a pool of 49 balls. The balls are numbered from 1 to
Mark 6 is a lottery game that draws unique balls out of a pool of 49 balls. The balls are numbered from 1 to 49. Some VBA code has been vwritten to mimic the Mark 6 lottery game by drawing 6 unique numbers from 1 to 49 into cells A1 to A6. Here is the code: Sub Mark6() Dim Number As Integer, Total As Integer Dim Test As Integer, TestResult As Boolean Range ("Al:A6").Clear Total = 1 Do while Total < 6 Number = Int(Rnd()49) + 1 TestResult = Blank 1 If Total >1 Then For Test = 1 To Total - 1 If Number = Cells(Test, 1).Value Then TestResult = Blank 2 End If Next Test End If If Not TestResult Then Cells(Total, 1).Value = Number Total = Total + 1 End If Loop End Sub What is the code you need to put in each blank above so that the code can draw 6 unique numbers out of 1 to 49 and put them in cells A1 to A6? You need to write the answers clearly in the boxes below. Do not write any spaces in the answers. For example, if you need to write an expression such as A+ B. you will write A+B without any spaces in between. Blank 1 is Blank 2 is
Step by Step Solution
3.45 Rating (171 Votes )
There are 3 Steps involved in it
To complete the given VBA code for the lottery program we need to unde... View full answer
Get step-by-step solutions from verified subject matter experts
