Help
Posted: Sat Sep 24, 2005 11:53 am
How do i make it that when i press on a button in one Textbox is will give me a random number from 1-10.This is in VB6
Visit remnantmods.com for more information
http://www.halomods.info/
Code: Select all
private sub command1_click()
text1.text = int(rnd * 10)
end sub
Code: Select all
If TextBox1.Equals(TextBox2 Then
MessageBox.Show("You have done it")
Else
MessageBox.SHow("Try again")
wat are u coding in?Patrickssj6 wrote:Yes i found it already on google.Tnx anyway.BUt i have another problem:
I want to make that if TextBox1 equals TextBox2 there will be a MessageBox.BUt som,ehow it doesn't work.
This is what i did:Code: Select all
If TextBox1.Equals(TextBox2 Then MessageBox.Show("You have done it") Else MessageBox.SHow("Try again")
Code: Select all
private sub command2_click()
if text1.text = text2.text then
msgbox("yea its equal")
else
msgbox("not equal =<")
endif
make 2 text boxes and 2 command buttons in code section have thisPatrickssj6 wrote:well that code doesn't work for me.I have the express edition if this helps.But i try to change it to my version gimme a sec
Code: Select all
private sub command1_click()
text1.text and text2.text = int(rnd * 10)
end sub
private sub command2_click()
if text1.text = text2.text then
msgbox("yea its equal")
else
msgbox("not equal =<")
endif
end sub