# New Solitaire Question

Page 1 of 1

## 1 Replies - 1124 Views - Last Post: 06 April 2009 - 11:07 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=97725&amp;s=c6f81ed7fca75ddfe32e901747159c1b&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 ymilan

Reputation: 1
• Posts: 5
• Joined: 16-March 09

# New Solitaire Question

Posted 06 April 2009 - 10:10 PM

The following code works, EXCEPT it does not display the first card image at all. Any ideas? I tried just about everything....thanks.

```Private Sub Start_Click()
Dim arrDeck(52)
Randomize
Dim CardCount As Integer
Dim CardVal As Integer
Dim Subnum As Integer
Dim Counter As Integer

CardCount = 1

Do While CardCount < 53
arrDeck(CardCount) = -1
CardCount = CardCount + 1
Loop

CardCount = 1
Counter = 0

Do While CardCount < 53 And Counter < 53
10 CardVal = Int((52 * Rnd) + 1)
If arrDeck(CardVal) = -1 Then
arrDeck(CardVal) = CardCount
Subnum = Counter
Image1(Subnum) = Image1(CardVal)
Image1(CardVal).Visible = True
CardCount = CardCount + 1
Counter = Counter + 1
Else:  GoTo 10
End If
Loop
```

This post has been edited by JackOfAllTrades: 07 April 2009 - 04:30 AM

Is This A Good Question/Topic? 0

## Replies To: New Solitaire Question

### #2 firebolt

• D.I.C Lover

Reputation: 93
• Posts: 5,561
• Joined: 20-February 09

## Re: New Solitaire Question

Posted 06 April 2009 - 11:07 PM

Well, for starters, you need to put your code in the [code] tags .

I think you need something in the Private Sub Form_Load().
But anything else, I'm not 100% sure.