Programming in Visual Basic - Lesson 3
25 Responses to “Programming in Visual Basic - Lesson 3”Leave a ReplyPosted on October 20th, 2006 by admin Filed under Visual Basic | |
|
Programming in Visual Basic - Lesson 3
25 Responses to “Programming in Visual Basic - Lesson 3”Leave a ReplyPosted on October 20th, 2006 by admin Filed under Visual Basic | |
|
May 26th, 2007 at 8:35 pm
Moe70… thanks for …
Moe70… thanks for the wonderful tutorial.
May 28th, 2007 at 9:12 am
Wonderfullllll!!!!! …
Wonderfullllll!!!!!
whenz the next tutorial coming?
June 3rd, 2007 at 1:36 pm
great lesson! what …
great lesson! what was that you were typing into the code of the calculate button?
June 3rd, 2007 at 1:55 pm
never mind i got it …
never mind i got it,
keep up the good lessons
June 3rd, 2007 at 1:57 pm
This is what you …
This is what you type for the code of the Command button:
If Label1.Caption = “+” Then
Text3.Text = Val(Text1) + Val(Text2)
ElseIf Label1.Caption = “-” Then
Text3.Text = Val(Text1) - Val(Text2)
ElseIf Label1.Caption = “/” Then
Text3.Text = Val(Text1) / Val(Text2)
ElseIf Label1.Caption = “*” Then
Text3.Text = Val(Text1) * Val(Text2)
End If
July 12th, 2007 at 8:47 pm
The best way to do …
The best way to do this is by putting 4 command butons. the code is:
Private sub command1_click()
text3.text = Val(text1) + Val(text2)
end sub
Private sub command1_click()
text3.text = Val(text1) - Val(text2)
end sub
Private sub command1_click()
text3.text = Val(text1) * Val(text2)
end sub
July 12th, 2007 at 8:49 pm
Private sub …
Private sub command4_click()
text3.text = Val(text1) / Val(text2)
end sub
WOOPS I MADE A MISTAKE ON THE CODE ABOVE, yOU SHOULD CHANGE THE command1 to command2 and command3 for the last 2 commands hehehe my bad, I just copy pasted it thats why.
July 21st, 2007 at 1:19 pm
Thanks, i learned a …
Thanks, i learned a lot of this tutorial, and the other tutorials, Thx Moe70.
August 13th, 2007 at 10:14 am
Great tutorial, …
Great tutorial, check my tutorials about visual basic to ! just click my name, i have more visual basic tutorials than anybody on youtube.
August 17th, 2007 at 4:37 pm
You should also get …
You should also get familiar with editing text documents, add the following code to a button and see what happens:
On Error GoTo Error
Open “c:\test.txt” For Append As #1
Print #1, “Hello!”
Close #1
Exit Sub
Error:
MsgBox “Error. An error was encountered. details are as follows: ” & Err.description & “, vbCritical, “Error”
September 9th, 2007 at 3:07 am
Can someone explain …
Can someone explain me what Dim means, i see it in some other turotials but i really dont get it.
September 16th, 2007 at 3:27 am
Dim declares a …
Dim declares a variable.
September 16th, 2007 at 7:29 am
try starting the …
try starting the program,and then
press + and then Calculate
- then calculate
* then calculate
/ then calculate
I get “run time 6 - Overflow ”
Does anyone know a way round this please.
September 16th, 2007 at 8:08 am
also try entering a …
also try entering a number in what is label1, but leave label2 blank and hit calculate,
I get runtime error 11 - Division by 0.
I know both of these error messages are created by the user doing something stupid, but it would still be nice to know how to get rid of it.
September 20th, 2007 at 1:57 pm
yep.
thats whats …
yep.
thats whats makes the differece between a programmer and a PROgrammer
October 17th, 2007 at 4:01 am
very helpful thanks
very helpful thanks
October 22nd, 2007 at 1:16 pm
Thank you for this
Thank you for this
October 28th, 2007 at 12:14 pm
i need to know how …
i need to know how to make a box like options
like there is a msgbox so i need box wich i can put buttons and etc
November 3rd, 2007 at 9:06 pm
under the sub type …
under the sub type
On error resume next
basically will by pass most errors
November 19th, 2007 at 1:23 pm
Nice one it may …
Nice one it may help the newbs
December 13th, 2007 at 4:01 pm
is it
+ - X / ?
is it
+ - X / ?
December 24th, 2007 at 6:28 am
no + - * /
no + - * /
December 30th, 2007 at 8:50 am
Check my video …
Check my video tutorials! EVEN HIDING YOUR PROGRAMS PROCESS I TASKBAR (XP TOO) Just click my name!
January 5th, 2008 at 11:35 am
I get some error …
I get some error compiling it. Only “+” work.
-*/ = Object Required?
Anyways thx for you help!
January 9th, 2008 at 6:15 pm
please can anyone …
please can anyone tell link the link for the trial version download for VB6…ide be very happy ive been looking for it for ages