G
Guest
Guest
Bonjour à tous,
j'ai trouvé ces codes pour afficher un calendrier mais je voudrais limiter cette fonction à une plage de cellules.j'ai trouvé la solution pour une cellule ou pour une ou plusieurs colonnes mais pas pour une plage de cellules.
'Private Sub CommandButton1_Click()
'ActiveCell = DTPicker1.Value
'Unload Me
'End Sub
'Private Sub CommandButton2_Click()
'Unload Me
'End Sub
'Private Sub UserForm_Initialize()
' DTPicker1.Value = Date
'End Sub
pour les colonnes:
private sub worksheet selectionchange(by val target as range)
if not (target.column >=2 and target.column<=3) then exit sub
userform1.show
end sub
pour une cellule
private sub worksheet selectionchange(by val target as range)
if target.adress<> "$a$1" then exit sub
userform1.show
end sub
merci à tous
j'ai trouvé ces codes pour afficher un calendrier mais je voudrais limiter cette fonction à une plage de cellules.j'ai trouvé la solution pour une cellule ou pour une ou plusieurs colonnes mais pas pour une plage de cellules.
'Private Sub CommandButton1_Click()
'ActiveCell = DTPicker1.Value
'Unload Me
'End Sub
'Private Sub CommandButton2_Click()
'Unload Me
'End Sub
'Private Sub UserForm_Initialize()
' DTPicker1.Value = Date
'End Sub
pour les colonnes:
private sub worksheet selectionchange(by val target as range)
if not (target.column >=2 and target.column<=3) then exit sub
userform1.show
end sub
pour une cellule
private sub worksheet selectionchange(by val target as range)
if target.adress<> "$a$1" then exit sub
userform1.show
end sub
merci à tous
Dernière modification par un modérateur: