Bonjour,

L'utilisateur doit remplir un questionnaire. En appuyant sur entrée dans chaque cellule, il peut passer d'une cellule à une autre.
Il faudrait qu'après avoir rempli une de ces cellules, la souris se positionne sur un optionbutton positionné en dessous.

J'aimerais savoir s'il est possible de positionner le curseur de la souris à un endroit précis de la feuille.

Merci pour votre aide.
Bonne journée.

Le code actuel est le suivant :
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
19
20
21
22
23
24
25
26
27
28
29
30
 
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ligne As Variant
Dim colonne As Variant
 
ligne = Target.Row
colonne = Target.Column
 
If Target.Count > 1 Or Intersect(Target, Range("E5,E7,K5,K7,E17,E19,E21,E23,J19,J21,J23,G27,G28,G29,G30,G33,G35")) Is Nothing Then Exit Sub
 
    If ligne = 5 And colonne = 5 Then Cells(ligne + 2, colonne).Select    'Si E5 est remplie, on passe à E7
    If ligne = 7 And colonne = 5 Then Cells(ligne - 2, colonne + 6).Select  'Si E7 on passe à K5
    If ligne = 5 And colonne = 11 Then Cells(ligne + 2, colonne).Select
    If ligne = 7 And colonne = 11 Then Cells(ligne + 2, colonne - 8).Select
 
    If ligne = 17 And colonne = 5 Then Cells(ligne + 2, colonne).Select
    If ligne = 19 And colonne = 5 Then Cells(ligne, colonne + 5).Select
    If ligne = 19 And colonne = 10 Then Cells(ligne + 2, colonne - 5).Select
    If ligne = 21 And colonne = 5 Then Cells(ligne, colonne + 5).Select
    If ligne = 21 And colonne = 10 Then Cells(ligne + 2, colonne - 5).Select
    If ligne = 23 And colonne = 5 Then Cells(ligne, colonne + 5).Select
    If ligne = 23 And colonne = 10 Then Cells(ligne + 3, colonne - 3).Select
    If ligne = 26 And colonne = 7 Then Cells(ligne + 1, colonne).Select
    If ligne = 27 And colonne = 7 Then Cells(ligne + 1, colonne).Select
    If ligne = 28 And colonne = 7 Then Cells(ligne + 2, colonne).Select
    If ligne = 30 And colonne = 7 Then Cells(ligne + 3, colonne).Select
    If ligne = 33 And colonne = 7 Then Cells(ligne + 2, colonne).Select
    If ligne = 35 And colonne = 7 Then Cells(ligne + 3, colonne - 5).Select
 
End Sub