Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VB2008 Why doesnt this work?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
madmunky
Newbie cheater
Reputation: 0

Joined: 08 Mar 2008
Posts: 21

PostPosted: Thu Mar 13, 2008 4:32 am    Post subject: VB2008 Why doesnt this work? Reply with quote

Code:
       
        Dim firstname As String
        Dim lastname As String

        firstname = TextBox1.Text
        lastname = TextBox2.Text

        If firstname = "foo" And lastname = "bar" Then
            MsgBox("Thats my name!")
                 else MsgBox(firstname + " " + lastname)
        Endif


But his code does

Code:
        Dim firstname As String
        Dim lastname As String

        firstname = TextBox1.Text
        lastname = TextBox2.Text

        If firstname = "foo" And lastname = "bar" Then MsgBox("Thats my name!") Else
        MsgBox("Your name is: " + firstname + " " + lastname)


VB Doesn't like it why?
Back to top
View user's profile Send private message
Estx
Expert Cheater
Reputation: 0

Joined: 04 Mar 2008
Posts: 172

PostPosted: Thu Mar 13, 2008 5:30 am    Post subject: Reply with quote

The first code snippet isn't working?

Try re-arrange it like so:
Code:
        Dim firstname As String
        Dim lastname As String

        firstname = TextBox1.Text
        lastname = TextBox2.Text

        If firstname = "foo" And lastname = "bar" Then
            MsgBox("Thats my name!")
        Else
            MsgBox(firstname + " " + lastname)
        Endif


If that doesn't work, let me know where the code shows error/warning lines. (don't have VB2008 installed anymore)
Back to top
View user's profile Send private message
madmunky
Newbie cheater
Reputation: 0

Joined: 08 Mar 2008
Posts: 21

PostPosted: Thu Mar 13, 2008 5:45 am    Post subject: Reply with quote

That worked, strange...
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Thu Mar 13, 2008 1:15 pm    Post subject: Re: VB2008 Why doesnt this work? Reply with quote

Try using & instead of +
_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites