Results 1 to 2 of 2

Thread: conversions...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Posts
    25

    Question

    Am taking in some input from an external device into the mscomm control, I am using...

    Temp = MSComm1.Input

    Inbuff = CByte(Temp)


    in the above, temp is a string, inbuff is a byte

    Lets say I get 'y' in the temp string, should this conversion end me up with the value of 121 stored in inbuff?

    I am getting a type mismatch error when it hits that line of code.

    Any input would be greatly appreciated

  2. #2
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372
    Use Inbuff = Asc(Temp)

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