Bonjour,
je voudrais vérifier que le user connecté appartient bien à une des trois tables utilisateurs.
J'ai écritou encore plus simple pour essayer de comprendre
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Dim PlgAll As Range, Iset As Range Set Cel = Sheets("Données").Range("A2") Set PlgAll = Union(Range("TbStg[N° d''agent]"), Range("TbAT[AT user]"), Range("TbAll[All user]")) Set Iset = Application.Intersect(Cel, PlgAll) If Iset Is Nothing Then MsgBox "Cellule hors plage" Else MsgBox "Cellule dans plage" End If
aucun code ne fonctionne pourtant dans mon fichier =A2=C20 renvoie VRAI
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 If Not Intersect(ActiveCell, Range("C5:C27")) Is Nothing Then MsgBox "Dans la plage" Else MsgBox "Pas dans la plage" End If End Sub
Est-ce que quelqu'un peut m'aider svp.
Merci






Répondre avec citation



Partager