Results 1 to 16 of 16

Thread: Square Root

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    83

    Square Root

    This is my first code ive submitted so it wont be that good.

    VB Code:
    1. Public num As Integer
    2.  
    3. Public Function SquareRoot(TextBox As String)
    4. On Error Resume Next
    5. num = 1
    6. Do
    7. num = num + 1
    8. If num * num = TextBox Then Exit Do
    9. Loop
    10. MsgBox num
    11. End Function

    To use, put
    VB Code:
    1. SquareRoot(25) 'change number
    In your form.
    Last edited by SlicedCheese; Jan 25th, 2006 at 11:17 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