Results 1 to 2 of 2

Thread: Rounded long

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2006
    Posts
    29

    Talking Rounded long

    Ok guys

    evb3

    I got a input string from a sensor....

    Q,316,002.16,M,00,1F

    to get speed I use

    Dim speed As Long
    speed = CLng(Mid(strSentence, 7, 6))

    but....instead of getting speed = 2.16, i get speed =2 . How am I suppose to get the real value?

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Rounded long

    Long is a whole number. Us single or double - try cdbl (or similar)

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