Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 I don't see what's wrong with this line...
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
HazySmoke)345




PostPosted: Sat Dec 24, 2005 4:28 pm   Post subject: I don't see what's wrong with this line...

code:
Private Sub Form_Load()
    First
End Sub

Sub First()
    Second (1,1)
End Sub

Sub Second(x As Integer, y As Integer)
    If x <> 1 Then Exit Sub
    If y <> 1 Then Exit Sub
    Msgbox "Thanks, guys, this program now works!"
End Sub


Right. That's the program. While I'm writing the script, the line "Second (1,1)" is highlighted in red. It said that "=" is expected. I don't see how Rolling Eyes. So I ran the program anyways, and, again, the program wouldn't run because of that same line, but this time, it says "syntax error". I don't really see what's wrong with it Mad, it looks... fine.
Sponsor
Sponsor
Sponsor
sponsor
cool dude




PostPosted: Sat Dec 24, 2005 6:05 pm   Post subject: (No subject)

i'm not sure exactly wat u want your program to do but to make the program run and stop the syntax error all u have to do is instead of saying Second (1,1) u have to say call Second (1,1)
diqua




PostPosted: Fri Jan 13, 2006 2:28 pm   Post subject: (No subject)

take the brackets out ( and )
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: