Bonjour le forum,
j'ai un petit problème et comme son nom l'indique, ce que j'ai plusieurs fonction qui se repete et je demande est ce qu'il y a une possibilité de les regroupés toutes
Merci d'avance
j'ai un petit problème et comme son nom l'indique, ce que j'ai plusieurs fonction qui se repete et je demande est ce qu'il y a une possibilité de les regroupés toutes
Code:
Label1.Caption = Feuil1.Cells(32, 3)
Label2.Caption = Feuil1.Cells(34, 3)
Label3.Caption = Feuil1.Cells(35, 3)
Label4.Caption = Feuil1.Cells(36, 3)
Label5.Caption = Feuil1.Cells(37, 3)
Label6.Caption = Feuil1.Cells(38, 3)
Label7.Caption = Feuil1.Cells(39, 3)
Label8.Caption = Feuil1.Cells(40, 3)
Label9.Caption = Feuil1.Cells(41, 3)
Label10.Caption = Feuil1.Cells(42, 3)
Label11.Caption = Feuil1.Cells(43, 3)
Label12.Caption = Feuil1.Cells(44, 3)
Label13.Caption = Feuil1.Cells(45, 3)
Label14.Caption = Feuil1.Cells(46, 3)
Label15.Caption = Feuil1.Cells(47, 3)
Label16.Caption = Feuil1.Cells(48, 3)
Label17.Caption = Feuil1.Cells(49, 3)
Label18.Caption = Feuil1.Cells(50, 3)
Label19.Caption = Feuil1.Cells(52, 3)
Label20.Caption = Feuil1.Cells(53, 3)
Label21.Caption = Feuil1.Cells(54, 3)
Label22.Caption = Feuil1.Cells(55, 3)
Label23.Caption = Feuil1.Cells(56, 3)
Code:
res2 = daveReadBytes(dc, daveDB, 3, 20, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(32, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 22, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(33, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 24, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(34, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 26, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(35, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 28, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(36, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 30, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(37, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 38, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(38, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 46, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(39, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 62, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(40, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 78, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(41, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 96, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(44, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 104, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(45, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 112, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(46, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 120, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(47, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 128, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(48, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 136, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(49, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 3, 158, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(50, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 10, 114, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(52, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 10, 116, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(53, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 10, 118, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(54, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 10, 120, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(55, 3) = daveGetS16(dc)
Next
End If
'***********************
res2 = daveReadBytes(dc, daveDB, 10, 122, NbBytes, 0)
If res2 = 0 Then
For x = 0 To NbBytes - 2
Cells(56, 3) = daveGetS16(dc)
Next
End If
Merci d'avance