Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MSCOMM returning garbage as input

I created a form and put the mscomm object on it. i am using this code and
it doesn't work. The mscomm1.input returns junk.

please help.

Private Sub CommandButton1_Click()

If UserForm1.MSComm1.PortOpen Then
MsgBox (UserForm1.MSComm1.PortOpen)
Exit Sub
End If

UserForm1.MSComm1.CommPort = 2
UserForm1.MSComm1.Settings = "9600,N,8,1"
UserForm1.MSComm1.InputLen = 0
UserForm1.MSComm1.InputMode = comInputModeText
UserForm1.MSComm1.RTSEnable = True
UserForm1.MSComm1.Handshaking = comRTSXOnXOff
UserForm1.MSComm1.RThreshold = 1
UserForm1.MSComm1.PortOpen = True


MsgBox (UserForm1.MSComm1.PortOpen)
UserForm1.Show


and the oncomm event on the control

Private Sub MSComm1_OnComm()
MsgBox ("Hello Marty1")

MsgBox UserForm1.MSComm1.Input
'Range("B9").Select
' ActiveCell.FormulaR1C1 = Left(MSComm1.Input, 10)
' Debug.Print MSComm1.Input
End Sub


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning value based on input data mtroute Excel Worksheet Functions 2 April 17th 06 10:01 PM
Deleting garbage Sandra[_6_] Excel Programming 13 May 5th 05 05:47 PM
MSComm locking up Excel Eric Excel Programming 1 December 13th 04 05:43 PM
MSCOMM markm Excel Programming 3 November 21st 03 02:49 PM
Loading MSComm.vbx into Excel VB ryan Excel Programming 0 August 10th 03 06:17 PM


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"