Bonjour Tout le monde , j'ai ce code qui me permet de récupérer mes cellules dans mon formulaire ça marche bien mais à un moment ça plante et ça m'affiche l'erreur dans le titresachant que j'ai dans ma feuille plus que 20 000 lignes est il vient de al déclaration des variables
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 Dim ok As Boolean Private Sub ComboBoxCodeGDO_Change() Dim Ligne As Integer Dim derlign As Long If ok = True Then Exit Sub With Sheets("Information2") derlign = .Range("A65536").End(xlUp).Row Ligne = .Range("A2:N" & derlign).Find(ComboBoxCodeGDO, lookat:=xlWhole).Row ok = True ComboBoxCodeDépartHTA.Value = .Range("H" & Ligne) ComboBoxNomDépartHTA.Value = .Range("I" & Ligne) 'ComboBoxCodeGDO.Value = .Range("J" & Ligne) ComboBoxNomPoste.Value = .Range("K" & Ligne).Value ComboBoxCommune.Value = .Range("M" & Ligne).Value ComboBoxSiteOpérationnel.Value = .Range("N" & Ligne) End With ok = False End Sub
Partager