Sub ComEvent()
Dim buf As Variant
Dim lg As Long
Select Case fhaupt.MSComm1.CommEvent
Case comEvReceive
lg = fhaupt.MSComm1.InBufferCount
buf = fhaupt.MSComm1.Input
Call protokoll(buf, lg)
Case comEvSend:
…
end sub
Sub protokoll(ar As Variant, lg As Long)
Dim Arr() As Byte
Dim c As Byte
Dim n As Long
Arr = ar
For n = 0 To lg - 1
c = Arr(n)