Exforsys
+ Reply to Thread
Results 1 to 4 of 4

Problem in visual basic......????

This is a discussion on Problem in visual basic......???? within the Microsoft .NET forums, part of the Programming Talk category; I want to print the numbers 1 to 99. i have written the following code: private sub cmdCommand1_click() dim i ...

  1. #1
    anmol004@gmail. is offline Junior Member Array
    Join Date
    Apr 2007
    Answers
    2

    Problem in visual basic......????

    I want to print the numbers 1 to 99.
    i have written the following code:

    private sub cmdCommand1_click()
    dim i as integer
    for i = 1 to 99
    print i
    next i
    end sub

    What's wrong with this coding? The output of above is all the numbers from 1 to 16?


  2. #2
    ganeshmoorthy is offline Junior Member Array
    Join Date
    Aug 2007
    Location
    Indian living in UAE
    Answers
    3
    where do you want to print, on the form or to the printer. If on the form, this code is correct and working fine. If you want to print on the printer then the code should be
    Dim i As Integer
    For i = 1 To 99
    Printer.Print i
    next i
    Printer.EndDoc
    try this and revert me if this is want you wanted


  3. #3
    velskvm is offline Junior Member Array
    Join Date
    May 2007
    Answers
    1

    Thumbs up use scrollbar to see the remaining numbers

    use scrollbar to see the remaining numbers


  4. #4
    sourabhroy2586 is offline Junior Member Array
    Join Date
    Apr 2008
    Location
    pune
    Answers
    4
    Quote Originally Posted by anmol004@gmail. View Post
    I want to print the numbers 1 to 99.
    i have written the following code:

    private sub cmdCommand1_click()
    dim i as integer
    for i = 1 to 99
    print i
    next i
    end sub

    What's wrong with this coding? The output of above is all the numbers from 1 to 16?
    its working fine buddy


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...