Bonjour à tous,
J'utilise une macro qui permet aux boutons présents sur les feuilles de mon classeur, de se positionner en regard de la ligne choisie en colonne "C".
Sub BoutonSuiveur(Target As Range)
Dim PositionLigne%, PositionColonne%
With ActiveSheet
If Target.Count > 1 Then Exit Sub ' pour éviter la sélection de plus d'une cellule
If Target.Column = 3 Then
PositionLigne = IIf((Target.Row) < 0, 0, Target.Row)
PositionColonne = IIf(Target.Column < 0, 0, Target.Column + 11)
.CommandButton1.Top = .Rows(PositionLigne).Top - 10
.CommandButton1.Left = .Columns(PositionColonne).Left - 50
.CommandButton2.Top = .Rows(PositionLigne).Top + 90
.CommandButton2.Left = .Columns(PositionColonne).Left - 25
End If
End With
End Sub
Cette macro semble empêcher le copier/coller des cellules de cette colonne.
Est-ce la fonction "Target" ?
Y a-t-il une parade ?
Merci.
J'utilise une macro qui permet aux boutons présents sur les feuilles de mon classeur, de se positionner en regard de la ligne choisie en colonne "C".
Sub BoutonSuiveur(Target As Range)
Dim PositionLigne%, PositionColonne%
With ActiveSheet
If Target.Count > 1 Then Exit Sub ' pour éviter la sélection de plus d'une cellule
If Target.Column = 3 Then
PositionLigne = IIf((Target.Row) < 0, 0, Target.Row)
PositionColonne = IIf(Target.Column < 0, 0, Target.Column + 11)
.CommandButton1.Top = .Rows(PositionLigne).Top - 10
.CommandButton1.Left = .Columns(PositionColonne).Left - 50
.CommandButton2.Top = .Rows(PositionLigne).Top + 90
.CommandButton2.Left = .Columns(PositionColonne).Left - 25
End If
End With
End Sub
Cette macro semble empêcher le copier/coller des cellules de cette colonne.
Est-ce la fonction "Target" ?
Y a-t-il une parade ?
Merci.