Results 1 to 11 of 11

Thread: math, simple logic

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2009
    Posts
    492

    math, simple logic

    is my logic problem?

    I want that number "75", foreach 20
    show result:
    0
    20
    40
    60
    75

    any advice please!


    Code:
    Private Sub Command1_Click()
    Dim a As Integer
    Dim b As Integer
    Dim c As Integer
    
    a = "75"
    
    b = a Mod 20
    c = a \ 20
    
    
    Dim i As Integer
    For i = 0 To a Step 20
    List1.AddItem i
    Next i
    
    List1.AddItem b
    List1.AddItem c
    
    
    End Sub
    Last edited by rpool; Jun 16th, 2011 at 02:57 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width