Results 1 to 6 of 6

Thread: Easy problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344
    Lets say if i have 5.5 in a caption how would i get just the 5

    i know it has something to do with the int command
    -RaY
    VB .Net 2010 (Ultimate)

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    188
    Try this.

    Label1.Caption = Format(Label1.Caption, "0")

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    No

    that rounds it off
    -RaY
    VB .Net 2010 (Ultimate)

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    hgey

    the first 5.....out of 5.5 hehe
    lets say if its 1.6....how do i get the 1...that might clear things up
    -RaY
    VB .Net 2010 (Ultimate)

  5. #5
    Guest
    Are you looking for
    Int(caption)?

    Int(1.6) is 1


  6. #6
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Maybe this will help:
    Code:
    Label1.Caption  = Int(Label1.Caption )
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

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