Ho provato ad utilizzare le label anche queste in matrice e funzionano
non funzionano le textbox non ne riesco a capire il motivo
questa la maschera

le label sono state impostate nel codice correttamente le test box sono rimaste vuote come si vede
Private Sub Form_Load()
For r = 1 To 6
Me.Label1(r - 1).Caption = BCSetReg(r)
Next r
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form1.SetFocus
Form1.Timer1.Enabled = True
Form1.MSComm3.PortOpen = True
End Sub
Private Sub Leggi_Click()
Dim buffer As Variant
Dim arr() As Byte
Dim setpoint(6) As Long
Call modbus2(255, 3, 0, 18, 0, 6)
Lenght = 6 * 2 + 5
Form1.MSComm2.InputLen = Lenght
While Form1.MSComm2.InBufferCount < Lenght
Wend
buffer = Form1.MSComm2.Input
arr = buffer
For x = 1 To Lenght
bufrc2(x - 1) = arr(x - 1)
Next x
mycrc = calccrc2(Lenght, 1)
crcl = arr(Lenght - 2)
crch = arr(Lenght - 1)
node = arr(0)
func = arr(1)
btor = arr(2)
If ((crcl = crcl2) And (crch = crch2)) Then
For r = 1 To btor / 2
value = 256
value = value * arr(r * 2 + 1)
value = value + arr(r * 2 + 2)
BCSETPOINT(r) = value
Me.Text1(r - 1).Enabled = True
Me.Text1(r - 1).Text = Format(BCSETPOINT(r), "00000")
Me.Text1(r - 1).Visible = True
Next r
Else
response = MsgBox("MODBUS CRC16 ERROR", vbOKOnly)
End If
For r = 1 To 5
setpoint(r - 1) = BCSETPOINT(r)
Next r
mycrc = calccrc(5, setpoint())
If mycrc <> BCSETPOINT(6) Then
response = MsgBox("SETPOINT CRC16 ERROR", vbOKOnly)
Else
response = MsgBox("SETPOINT CRC16 OK", vbOKOnly)
End If
End Sub