Mettre boucle for dans condition if VBA
Fermé
Jack
-
9 juil. 2012 à 11:21
vordano Messages postés 1682 Date d'inscription mardi 12 juillet 2011 Statut Membre Dernière intervention 20 juillet 2012 - 10 juil. 2012 à 16:42
vordano Messages postés 1682 Date d'inscription mardi 12 juillet 2011 Statut Membre Dernière intervention 20 juillet 2012 - 10 juil. 2012 à 16:42
A voir également:
- If for vba
- If exist ✓ - Forum Autoit / batch
- Vba range avec variable ✓ - Forum VB / VBA
- Erreur 1004 vba ✓ - Forum VB / VBA
- Download instagram for pc - Télécharger - Divers Communication
- Vba ouvrir un fichier excel avec chemin ✓ - Forum VB / VBA
16 réponses
Bonjour,
On ne vout pas trop ce que tu cherches à faire ..
Essaie ça :
dim bTrouvé as boolean ;
bTrouvé = false ;
if UBound(tab_bd)>0 then
for c=0 to UBound(tab_bd)
if cells(tab_bd(c),6)=cells(tab_bd(0),6) and
cells(tab_bd(c),7)=cells(tab_bd(0),7) and
cells(tab_bd(c),8)=cells(tab_bd(0),8) then
bTrouvé = true ;
exit for ;
next ;
end if ;
if bTrouvé then msgbox("OK") ;
cdlt
On ne vout pas trop ce que tu cherches à faire ..
Essaie ça :
dim bTrouvé as boolean ;
bTrouvé = false ;
if UBound(tab_bd)>0 then
for c=0 to UBound(tab_bd)
if cells(tab_bd(c),6)=cells(tab_bd(0),6) and
cells(tab_bd(c),7)=cells(tab_bd(0),7) and
cells(tab_bd(c),8)=cells(tab_bd(0),8) then
bTrouvé = true ;
exit for ;
next ;
end if ;
if bTrouvé then msgbox("OK") ;
cdlt