Option Explicit Dim deb_row As Integer Dim fin_row As Integer Dim deb_col As Integer Dim fin_col As Integer Dim x As Integer Dim zone As String Private Sub Command1_Click() grille.Col = deb_col grille.Row = deb_row zone = grille.Text If opt_H.Value = True Then grille.Row = deb_row grille.Col = fin_col If deb_row <> fin_row Then MsgBox "Faire sélection horizontale sur une seule ligne." Exit Sub End If Else grille.Row = fin_row grille.Col = deb_col If deb_col <> fin_col Then MsgBox "Faire sélection verticale sur une seule colonne." Exit Sub End If End If zone = zone & "-" & grille.Text Text1.Text = zone End Sub Private Sub Form_Load() For x = 0 To 9 grille.ColWidth(x) = 1000 grille.RowHeight(x) = 500 grille.Row = x grille.Col = 0 grille.Text = x Next x For x = 0 To 9 grille.ColWidth(x) = 1000 grille.RowHeight(x) = 500 grille.Row = x grille.Col = 1 grille.Text = x + 100 Next x For x = 0 To 9 grille.ColWidth(x) = 1000 grille.RowHeight(x) = 500 grille.Row = x grille.Col = 2 grille.Text = x + 200 Next x For x = 0 To 9 grille.ColWidth(x) = 1000 grille.RowHeight(x) = 500 grille.Row = x grille.Col = 3 grille.Text = x + 300 Next x End Sub Private Sub grille_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single) deb_row = grille.Row deb_col = grille.Col End Sub Private Sub grille_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single) fin_row = grille.RowSel fin_col = grille.ColSel End Sub