Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comm Port Controls

Status
Not open for further replies.

nheitz

Technical User
Jul 21, 2003
6
US
I'm writing a program for my company and I'm finished with everything except the final part which includes transferring the info from my database-like program to a machine on the shop floor. I'm familiar with most of the commands for opening comm ports and settings, but i can't figure out how to declare my comm port variable, or IF i need to. I'm using some sample code as a reference to help me. It looks like this:

private sub cmdGetData_Click()
dim foo as integer, thedata as string
mscomm1.comport=1
mscomm1.settings="28800,N,8,1"
mscomm1.inputlen=0
mscomm1.portopen=true
mscomm1.output="AT" + Chr$(13)
end sub

If i used code similar to this, would i need to declare mscomm1 somewhere? and what to set it as?

thanks
 
Could you be a little more specific?
 
project->components scroll down to microsoft comm control 6.0 (MSCOMM32.OCX) check the box... and drag one onto your form!!

good luck!

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
A General Guide To Excel in VB FAQ222-3383
The Great Date Debate Thread222-368305
File Formats Galore @ or
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top