Click here to Skip to main content
15,911,139 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Need to copy the results of a msgbox Pin
beeker55336-May-09 14:37
beeker55336-May-09 14:37 
GeneralRe: Need to copy the results of a msgbox Pin
Luc Pattyn6-May-09 15:12
sitebuilderLuc Pattyn6-May-09 15:12 
GeneralRe: Need to copy the results of a msgbox Pin
beeker55336-May-09 17:18
beeker55336-May-09 17:18 
AnswerRe: Need to copy the results of a msgbox Pin
_Damian S_6-May-09 18:04
professional_Damian S_6-May-09 18:04 
GeneralRe: Need to copy the results of a msgbox Pin
beeker55337-May-09 5:59
beeker55337-May-09 5:59 
QuestionVB6 card game question Pin
ymilan6-May-09 9:57
ymilan6-May-09 9:57 
AnswerRe: VB6 card game question Pin
Mycroft Holmes6-May-09 14:26
professionalMycroft Holmes6-May-09 14:26 
AnswerRe: VB6 card game question Pin
riced6-May-09 22:32
riced6-May-09 22:32 
Some comments on the code.
1 The For NewIndex = 0 To 12 - 1 loop will only be done with NewIndex = 0. It must take either the If or Else branch, both of which exit the sub.

2 Why have 12-1 as end value for loops? Why not just 11?

3 In the For NewIndex = 0 To 12 - 1 Else branch you have Image1(Index).Drag vbEndDrag. Should this be Image1(NewIndex).Drag vbEndDrag?

4 You don't need to initialise the index variables to 0 since they are set by the For statements.

5 Why is Index a parameter? Whatever value is sent in is ignored since you use it to control the inner loop. So it gets set to 1 and ends up at 12 irrespective of what was supplied. So when the sub returns, whatever variable was supplied will have value 12 (IIRC VB6 defaults to pass ByRef so it changes values in calling code). Is this what you want to do?

Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis

GeneralRe: VB6 card game question Pin
ymilan9-May-09 2:01
ymilan9-May-09 2:01 
GeneralRe: VB6 card game question Pin
riced10-May-09 2:17
riced10-May-09 2:17 
GeneralRe: VB6 card game question Pin
ymilan10-May-09 5:14
ymilan10-May-09 5:14 
GeneralRe: VB6 card game question Pin
ymilan9-May-09 3:01
ymilan9-May-09 3:01 
GeneralRe: VB6 card game question Pin
riced9-May-09 6:27
riced9-May-09 6:27 
GeneralRe: VB6 card game question Pin
ymilan10-May-09 5:14
ymilan10-May-09 5:14 
GeneralRe: VB6 card game question Pin
riced11-May-09 5:45
riced11-May-09 5:45 
GeneralRe: VB6 card game question Pin
ymilan15-May-09 11:27
ymilan15-May-09 11:27 
GeneralRe: VB6 card game question Pin
riced18-May-09 6:11
riced18-May-09 6:11 
GeneralRe: VB6 card game question Pin
ymilan18-May-09 9:22
ymilan18-May-09 9:22 
GeneralRe: VB6 card game question Pin
ymilan2-Jun-09 14:26
ymilan2-Jun-09 14:26 
GeneralRe: VB6 card game question Pin
riced3-Jun-09 4:42
riced3-Jun-09 4:42 
GeneralRe: VB6 card game question Pin
ymilan3-Jun-09 5:10
ymilan3-Jun-09 5:10 
GeneralRe: VB6 card game question Pin
ymilan3-Jun-09 6:28
ymilan3-Jun-09 6:28 
GeneralRe: VB6 card game question Pin
riced3-Jun-09 8:06
riced3-Jun-09 8:06 
GeneralRe: VB6 card game question Pin
ymilan3-Jun-09 9:02
ymilan3-Jun-09 9:02 
GeneralRe: VB6 card game question Pin
riced3-Jun-09 10:04
riced3-Jun-09 10:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.