Programming in Visual Basic - Lesson 3

best viewed double sized

Duration : 0:10:53



25 Responses to “Programming in Visual Basic - Lesson 3”

  1. LakkiMarwat Says:

    Moe70… thanks for …
    Moe70… thanks for the wonderful tutorial.

  2. abhishekrane Says:

    Wonderfullllll!!!!! …
    Wonderfullllll!!!!!

    whenz the next tutorial coming?

  3. asusrocks Says:

    great lesson! what …
    great lesson! what was that you were typing into the code of the calculate button?

  4. asusrocks Says:

    never mind i got it …
    never mind i got it,
    keep up the good lessons

  5. asusrocks Says:

    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

  6. Esoj Says:

    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

  7. Esoj Says:

    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.

  8. TomHax0r Says:

    Thanks, i learned a …
    Thanks, i learned a lot of this tutorial, and the other tutorials, Thx Moe70.

  9. SilverMagics Says:

    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.

  10. danagol1985 Says:

    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”

  11. pw0nzor Says:

    Can someone explain …
    Can someone explain me what Dim means, i see it in some other turotials but i really dont get it.

  12. jiggiwowow Says:

    Dim declares a …
    Dim declares a variable.

  13. shrouded60606 Says:

    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.

  14. shrouded60606 Says:

    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.

  15. CptRick999 Says:

    yep.
    thats whats …

    yep.
    thats whats makes the differece between a programmer and a PROgrammer

  16. hitman401 Says:

    very helpful thanks
    very helpful thanks

  17. TommyInVancouver Says:

    Thank you for this
    Thank you for this

  18. mjurgilas1997 Says:

    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

  19. sdtuu Says:

    under the sub type …
    under the sub type

    On error resume next

    basically will by pass most errors

  20. tosikosi Says:

    Nice one it may …
    Nice one it may help the newbs :D

  21. tamjob Says:

    is it

    + - X / ?
    is it

    + - X / ?

  22. zwawz Says:

    no + - * /
    no + - * /

  23. EXeCute2k Says:

    Check my video …
    Check my video tutorials! EVEN HIDING YOUR PROGRAMS PROCESS I TASKBAR (XP TOO) Just click my name!

  24. kbcbcofme Says:

    I get some error …
    I get some error compiling it. Only “+” work.
    -*/ = Object Required?

    Anyways thx for you help!

  25. hitman401 Says:

    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 :(

Leave a Reply

Posted on October 20th, 2006 by admin

Filed under Visual Basic |

|