I've also tried the same code with just one do-while loop surrounding all of the for-next loops and this simply doesn't work - there are duplicates in the values. I've put in the whole code just incase.
Expand|Select|Wrap|Line Numbers
- Private Sub btndeal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndeal.Click
- Dim rnum As Integer
- Dim cardmeanings(21) As String
- Dim card1num As Integer
- Dim card2num As Integer
- Dim card3num As Integer
- Dim card4num As Integer
- Dim card5num As Integer
- Dim card6num As Integer
- Dim card7num As Integer
- Dim card8num As Integer
- Dim card9num As Integer
- Dim card10num As Integer
- cardmeanings(0) = "The Fool: At #0, the Fool is the card of infinite possibilities. The bag on the staff indicates that he has all he needs to do or be anything he wants, he has only to stop and unpack. He is on his way to a brand new beginning. But the card carries a little bark of warning as well. Stop daydreaming and fantasizing and watch your step, lest you fall and end up looking the fool."
- cardmeanings(1) = "The Magician: At #1, the Magician is the male power of creation, creation by willpower and desire. You might well interpret that you will be given a vision, an idea, a magical - mental image of whatever it is you most want: the solution to a problem, an ambitious career, a love life, a job."
- cardmeanings(2) = "The High Priestess: The High Priestess is the card of secret or arcane knowledge. She holds scrolls of arcane information that she might reveal to you. The moon crown on her head indicates her willingness to illuminate what you otherwise might not see, reveal the secrets you need to know in order to make a decision."
- cardmeanings(3) = "The Empress: The Empress is a creator, be it creation of life, of romance, of art or business. While the Magician is the primal spark, the idea made real, and the High Priestess is the one who gives the idea a form, the Empress is the womb where it gestates and grows till it is ready to be born."
- cardmeanings(4) = "The Emporer: The Emperor card is the 'Who's the boss?' card. It is an important question. The meaning of the card includes being in control over your environment, your body, your temper, your instincts, your love life. This is not the time to give into the unconscious, not the time to let yourself be controlled by the wants and needs of others. It is a card that gives the Querent permission to be aggressive, brave, bold and in command."
- cardmeanings(5) = "The Hierophant: the Hierophant might well warn against being too stubborn, especially in matters of theology or ethics. He can remind the Querent what it means to be a good and beloved teacher. In this, the Hierophant can be very positive. When things are going very wrong in the world, the Hierophant is the one who wades in, quiets the panic, and offers good, practical advice."
- cardmeanings(6) = "The Lovers: LOVE is a force that makes you choose and decide for reasons you often can't understand; it makes you surrender control to a higher power. And that is what this card is all about. Finding something or someone who is so much a part of yourself, so perfectly attuned to you and you to them, that you cannot, dare not resist. In interpretation, the card indicates that the querent has come across, or will come across a person, career, challenge or thing that they will fall in love with."
- cardmeanings(7) = "The Chariot: On the one hand, the Chariot indicates loyalty and faith and motivation; a conviction that will lead to victory no matter the odds. But the chariot can also signal a ruthless, diehard desire to win at any cost. The Querent should be reminded to save his/her energy for what comes after. Victory is just the start of things."
- cardmeanings(8) = "Strength: You might get burned or scratched a few times by that which you're trying to control, be it a situation, a person or your own unworthy impulses. The important message of the strength card is not to give up. To have the courage to keep at it till you succeed and to have the faith and optimism that you will succeed."
- cardmeanings(9) = "The Hermit: the Hermit represents a wise, inspirational person, friend, teacher, therapist, someone the Querent usually sees alone, someone the rest of the Querent's friends and family may not know about. This a person who can shine a light on things that were previously mysterious and confusing. They will help the Querent find what it is they are seeking."
- cardmeanings(10) = "The Wheel of Fortune: With Jupiter as its ruling planet, the Wheel of Fortune is all about big things, luck, change, and fortune. Almost always good fortune. Almost every definition of this card indicates abundance, happiness, elevation, or luck; a change that just happens, and brings with it great joy."
- cardmeanings(11) = "Justice: With Libra as its ruling sign, Justice is about cold, objective balance through reason or natural force. This is the card that tells the Querent that they can't keep smoking and drinking without consequences to their health. It is the card that advises cutting out waste and insists that the Querent make adjustments, do whatever is necessary to bring things back into balance: physically, emotionally, socially, spiritually."
- cardmeanings(12) = "The Hangman: He makes himself vulnerable, sacrifices his position or opposition, and in doing so, gains illumination. Answers that eluded him become clear, solutions to problems are found. He sees the world differently, has almost mystical insights. This card can also imply a time when everything just stands still, a time of rest and reflection before moving on."
- cardmeanings(13) = "Death: The Death card indicates this transition from lower to higher to highest. This is a card of humility, and it may indicate the Querent as being brought low, but only so that they can then go higher than they ever have before. This is a time of change. Time for something to end; but time also for something new to begin. The Querent may honestly be told that they may feel sad or empty, low, but that this will give him a way to rise again, like a phoenix from the ashes."
- cardmeanings(14) = "Temperance: Temperance may be, at first glance, a warning to the Querent to 'temper' their behavior, to cut their wine with water. But it may also be a reminder to the Querent that seemingly irreconcilable opposites may not be irreconcilable at all."
- cardmeanings(15) = "The Devil: this is a card about ambitions; it is also synonymous with temptation and addiction. On the flip side, however, the card can be a warning to someone who is too restrained, someone who never allows themselves to get passionate or messy or wild - or ambitious. This, too, is a form of enslavement."
- cardmeanings(16) = "The Tower: When the Querent gets this card, they can expect to be shaken up, to be blinded by a shocking revelation. It sometimes takes that to see a truth that one refuses to see. Or to bring down beliefs that are so well constructed. However painful, makes room for something new to be built."
- cardmeanings(17) = "The Star: The Star is a card that looks to the future. It does not predict any immediate or powerful change, but it does predict hope and healing. This card suggests clarity of vision, spiritual insight. And, most importantly, that unexpected help will be coming, with water to quench the Querent's thirst."
- cardmeanings(18) = "The Moon: this is a card of great creativity, of powerful magic, primal feelings and intuition. The Querent who gets this card should be warned that they may be going through a time of emotional and mental trial; if they have any past mental problems, they must be vigilant in taking their medication. They should avoid drugs or alcohol"
- cardmeanings(19) = "The Sun: A positive card, it promises the Querent their day in the sun. Glory, gain, triumph, pleasure, truth, success. As the moon symbolized inspiration from the unconscious, from dreams, this card symbolizes discoveries made fully conscious and wide awake. This is science and math, beautifully constructed music, carefully reasoned philosophy."
- cardmeanings(20) = "Judgement: Judgement is often a hard card to read; it usually signals just a big change, one that involves leaving something old completely behind and stepping into something completely new. Like closing the door on an old job, and opening the door to a new and very different career."
- cardmeanings(21) = "The World: the World card, very aptly, represents a successful conclusion, all aspects accounted for and taken in. Simply put, this card tells the Querent that the end to a long-term project is in sight, and that it will be accompanied by well-earned praise, celebration and success. With Saturn as its ruling planet, this card can also indicate that the Querent, now an expert in their subject, is likely to become a teacher or sought-after lecturer."
- Do Until card1num <> card2num And card1num <> card3num And card1num <> card4num And card1num <> card5num And card1num <> card6num And card1num <> card7num And card1num <> card8num And card1num <> card9num And card1num <> card10num
- For rnum = 1 To 21
- card1num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card2num <> card1num And card2num <> card3num And card2num <> card4num And card2num <> card5num And card2num <> card6num And card2num <> card7num And card2num <> card8num And card2num <> card9num And card2num <> card10num
- For rnum = 1 To 21
- card2num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card3num <> card1num And card3num <> card2num And card3num <> card4num And card3num <> card5num And card3num <> card6num And card3num <> card7num And card3num <> card8num And card3num <> card9num And card3num <> card10num
- For rnum = 1 To 21
- card3num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card4num <> card1num And card4num <> card2num And card4num <> card3num And card4num <> card5num And card4num <> card6num And card4num <> card7num And card4num <> card8num And card4num <> card9num And card4num <> card10num
- For rnum = 1 To 21
- card4num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card5num <> card1num And card5num <> card2num And card5num <> card3num And card5num <> card4num And card5num <> card6num And card5num <> card7num And card5num <> card8num And card5num <> card9num And card5num <> card10num
- For rnum = 1 To 21
- card5num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card6num <> card1num And card6num <> card2num And card6num <> card3num And card6num <> card4num And card2num <> card5num And card6num <> card7num And card6num <> card8num And card6num <> card9num And card6num <> card10num
- For rnum = 1 To 21
- card6num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card7num <> card1num And card6num <> card2num And card6num <> card3num And card6num <> card4num And card2num <> card5num And card6num <> card6num And card6num <> card8num And card6num <> card9num And card6num <> card10num
- For rnum = 1 To 21
- card7num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card8num <> card1num And card6num <> card2num And card6num <> card3num And card6num <> card4num And card2num <> card5num And card6num <> card6num And card6num <> card7num And card6num <> card9num And card6num <> card10num
- For rnum = 1 To 21
- card8num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card9num <> card1num And card6num <> card2num And card6num <> card3num And card6num <> card4num And card2num <> card5num And card6num <> card6num And card6num <> card7num And card6num <> card8num And card6num <> card10num
- For rnum = 1 To 21
- card9num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- Do Until card10num <> card1num And card6num <> card2num And card6num <> card3num And card6num <> card4num And card2num <> card5num And card6num <> card6num And card6num <> card7num And card6num <> card8num And card6num <> card9num
- For rnum = 1 To 21
- card10num = Math.Round(Rnd() * 21)
- Next rnum
- Loop
- card1.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card1num & ".jpg")
- card2.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card2num & ".jpg")
- card3.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card3num & ".jpg")
- card4.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card4num & ".jpg")
- card5.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card5num & ".jpg")
- card6.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card6num & ".jpg")
- card7.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card7num & ".jpg")
- card8.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card8num & ".jpg")
- card9.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card9num & ".jpg")
- card10.Load("C:\Documents and Settings\ScottInstrell\Desktop\Tarotech1\Tarotechpics\" & card10num & ".jpg")
- End Sub