954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Please help!

OrgBackG.jpgstartBtn.jpgOrg1.gifLuck1.gifLuck2.gifLuck3.gif Random number: Number total: Number of moves? Number of moves? Average:

Clientwidth / 1.8:

k8f1
Newbie Poster
13 posts since Nov 2007
Reputation Points: 11
Solved Threads: 1
 

When does it stop, on what line

bushman_222
Junior Poster in Training
65 posts since Jan 2008
Reputation Points: 10
Solved Threads: 4
 

Hi,

Whatever code you have pointed, I guess, there should not be any space between "Else" and "If"..
Check this :

if RandomOrg = 1 Then 
   Org.src = Org1Pic(Luck)
Elseif RandomOrg = 2 Then
   Org.src = Org2Pic(Luck)
Elseif RandomOrg = 3 Then
   Org.src = Org3Pic(Luck)
End if


Regards
Veena

QVeen72
Posting Shark
950 posts since Nov 2006
Reputation Points: 84
Solved Threads: 143
 

There are other alternatives to the end if, elseif,else if, and if statments,I have in the past used the same as a toolbar code is in a browser to handle events
case and select case is another way to perform events

example:

Dim Whatever as Integer
Select Case whatever
case whatever = somthing
case whatever could do somthing here
case else could be somthing else here
End Select
End Sub

this could be used instead of else if statments,Your going to need to play with it

vponline
Newbie Poster
9 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

Thank you all for your help!

The solution was as simple as taking out the space between the 'Else' and the 'If'. I spent ages trying to work it out, but sometimes you just can't see for looking!

Thanks,

Kate

k8f1
Newbie Poster
13 posts since Nov 2007
Reputation Points: 11
Solved Threads: 1
 

Best practice in coding is using a "tab spaces" and align the conditional statement so that it can be easily to read and debug... as what example did of QVeen

jireh
Posting Whiz
316 posts since Jul 2007
Reputation Points: 11
Solved Threads: 49
 

agreed i use tab spaces automatically ,i also added mouse scroll dll to be loaded aswell,seeing vb ignores the mouse wheel while loaded

vponline
Newbie Poster
9 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You