Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default problem with run-time error'424'

I have a problem with excel 03 giving me a run-time error '424' from runing a
macro.

the macro is design to get infromation for a gage connect to the computer
using com port

here is the code

Private Sub UserForm_Activate()
Dim ClearBuffer As String

' Clear the data in the plasticity curve data worksheet
Sheets("Plasticity Curve Data").Select
Range("rdgTime").Select
Selection.ClearContents
Range("PMeasurement").Select
Selection.ClearContents
Range("A2").Select


'configure the serial port
MSComm1.CommPort = 3 ' Use COM2.
MSComm1.Settings = "2400,N,8,1" ' 9600 baud, no parity, 8 data, and
1 stop bit.
MSComm1.InputLen = 0 ' Tell the control to read entire
buffer when Input is used.
MSComm1.RThreshold = 13 ' Activate Event Handler and send
event after xx No. Characters
MSComm1.PortOpen = True ' Open the port.
ClearBuffer = MSComm1.Input ' Clear the Serial Port buffer for
data capture

SetupMitutoyo 'Configure The Mitutoyo for distance
Measurement

' Configure Plasticity Measurement form
TextBox1.Text = ""
TextBox3.Text = ""
UserForm1.Top = 90
UserForm1.Left = 255
CommandButton1.Caption = "Start"
CommandButton1.SetFocus

End Sub

VBA's debug is highlighting MSComm1.CommPort = 3 ' Use COM2.
but, the gage is sending data , excel is not taking it.
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
Time problem Jon New Users to Excel 1 June 3rd 09 08:38 AM
Time Problem Thurlow Excel Worksheet Functions 6 September 4th 07 05:04 PM
Time problem - Help please sawagashi Excel Discussion (Misc queries) 7 November 18th 05 10:15 PM
1/0/1900 10:18:48 AM Time problem canix Excel Worksheet Functions 7 August 6th 05 03:41 AM
Time Problem B. Baumgartner Excel Discussion (Misc queries) 2 June 30th 05 09:05 PM


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

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

About Us

"It's about Microsoft Excel"