-
Mar 14th, 2013, 07:55 PM
#1
Thread Starter
New Member
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!
-
Mar 15th, 2013, 04:35 AM
#2
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
-
Mar 15th, 2013, 11:17 AM
#3
Thread Starter
New Member
Re: New to VB
but how do i read information from the comm port?
-
Mar 15th, 2013, 03:42 PM
#4
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
-
Mar 15th, 2013, 03:57 PM
#5
Thread Starter
New Member
Re: New to VB
i know, i've seen them all, i just can't make them work on excel
-
Mar 17th, 2013, 01:25 AM
#6
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|