Results 1 to 6 of 6

Thread: New to VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2013
    Posts
    6

    New to VB

    Hi there first of all, i am completly new into VB, i want to learn some because of a project i am intended to do.


    I need to be able to read information from a COM port and insert it into excel, i have seen lts of things in the web but haven't been able to do this in excel, i added the mscomm into the regisrty, tried inserting the activex control, but it wont work, it can't be inserted, idk why.

    Is this what i should be doing? or is something else needed?

    Thanks!

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: New to VB

    Is this what i should be doing? or is something else needed?
    sounds right to me

    add a userform
    menu > tools > additional controls
    microsoft communication control (mscomm32.ocx)
    add telephone control to userform, this may give error and the step above may need to be repeated

    i do not know if the mscomm control can be added to a sheet, but as the userform can remain hidden (or not) it does not matter
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2013
    Posts
    6

    Re: New to VB

    but how do i read information from the comm port?

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: New to VB

    use the oncomm event of the comm control

    there are many examples in the vb6 forum, or google
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2013
    Posts
    6

    Re: New to VB

    i know, i've seen them all, i just can't make them work on excel

  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2013
    Posts
    6

    Re: New to VB

    Can someone point me out?

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