1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
| Option Explicit
Private Sub cbox1_Click()
laprocedure cbox1.ListIndex
End Sub
Private Sub cbox2_Click()
laprocedure cbox2.ListIndex
End Sub
Private Sub cbox3_Click()
laprocedure cbox3.ListIndex
End Sub
Private Sub cbox4_Click()
laprocedure cbox4.ListIndex
End Sub
Private Sub cbox5_Change()
End Sub
Private Sub cbox5_Click()
laprocedure cbox5.ListIndex
End Sub
Private Sub cbox6_Click()
laprocedure cbox6.ListIndex
End Sub
Private Sub cbox7_Click()
laprocedure cbox7.ListIndex
End Sub
Private Sub cbox8_Click()
laprocedure cbox8.ListIndex
End Sub
Private Sub cbox9_Click()
laprocedure cbox9.ListIndex
'ATESTER.cbox9.Text = Format(cbox9.Value), "dd/mm/yyyy")
End Sub
Private Sub cbox10_Click()
laprocedure cbox10.ListIndex
End Sub
Private Sub cbox11_Click()
laprocedure cbox11.ListIndex
End Sub
Private Sub cbox12_Click()
laprocedure cbox12.ListIndex
End Sub
Private Sub cbox13_Click()
laprocedure cbox13.ListIndex
End Sub
Private Sub cbox14_Click()
laprocedure cbox14.ListIndex
End Sub
Sub laprocedure(Lindex)
Dim lecontrol As Object
For Each lecontrol In bduserf.Controls
If InStr(lecontrol.Name, "cbox") = 1 Then
bduserf.Controls(lecontrol.Name).ListIndex = Lindex
End If
Next
If cbox9.ListIndex <> 1 Then
CellHeure.Value = Format(cbox9.Value, "dd/mm/yy hh:mm")
CellHeure.Visible = True
End If
End Sub
Private Sub cbox9_DropButtonClick()
If cbox9.ListIndex <> 1 Then
CellHeure.Value = Format(cbox9.Value, "dd/mm/yy hh:mm")
End If
CellHeure.Visible = True
End Sub
Private Sub cbox9_Enter()
CellHeure.Visible = False
End Sub
Private Sub CellHeure_Enter()
CellHeure.Visible = False
cbox9.SetFocus
End Sub
Private Sub CommandButton1_Click()
End
End Sub
Private Sub SpinButton1_Change()
Dim Dernièreligne As Integer
Dim NoLigne As Integer
Dernièreligne = ActiveSheet.Range("A1").SpecialCells(xlCellTypeLastCell).Row
NoLigne = Dernièreligne - SpinButton1.Value
laprocedure NoLigne
Label1 = NoLigne + 1
End Sub
Private Sub UserForm_Initialize()
Dim Dernièreligne As Integer, i As Integer
Sheets("Bd").Activate
Dernièreligne = ActiveSheet.Range("A1").SpecialCells(xlCellTypeLastCell).Row
Debug.Print Dernièreligne
With SpinButton1
.Min = 2
.Max = Dernièreligne
.SmallChange = 1
End With
For i = 1 To 14
InitCombo Dernièreligne, i
Next
CellHeure.Visible = False
cbox8.Visible = False
cbox9.Visible = Not [S1] = "USP"
'CellHeure.Visible = Application.UserName = "USP"
CellHeure.Visible = Not [S1] = "USP"
End Sub
Sub InitCombo(NoLigne, NoColonne)
Dim NomCombo As String
Dim Plage As String
Sheets("Bd").Activate
Plage = Range(Cells(2, NoColonne), Cells(NoLigne, NoColonne)).Address
NomCombo = "cbox" & NoColonne
With bduserf.Controls(NomCombo)
.Value = Cells(1, NoColonne)
.RowSource = Plage
End With
End Sub |
Partager