bonjour a tous mon bouton fonctionne tres bien
mais j aurais une petite modif a lui apporter
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
31
32
33
34
35
36
37
38
39
40 Private Sub F7_Click() nombouton = "F7" nomcase = "F8" If Controls(nombouton).Caption = "" Then Controls(nombouton).Caption = "CJ" Controls(nombouton).BackColor = 33023 Controls(nomcase).Value = "12" ElseIf Controls(nombouton).Caption = "CJ" Then Controls(nombouton).Caption = "PCJ" Controls(nombouton).BackColor = 65535 ElseIf Controls(nombouton).Caption = "PCJ" Then Controls(nombouton).Caption = "CN" Controls(nombouton).BackColor = 16776960 ElseIf Controls(nombouton).Caption = "CN" Then Controls(nombouton).Caption = "PCN" Controls(nombouton).BackColor = 49152 ElseIf Controls(nombouton).Caption = "PCN" Then Controls(nombouton).Caption = "SAJ" Controls(nombouton).BackColor = 8454143 Controls(nomcase).Value = "11" ElseIf Controls(nombouton).Caption = "SAJ" Then Controls(nombouton).Caption = "SAN" Controls(nombouton).BackColor = 12583104 Controls(nomcase).Value = "12" ElseIf Controls(nombouton).Caption = "SAN" Then Controls(nombouton).Caption = "CA" Controls(nombouton).BackColor = 16777215 Controls(nomcase).Value = "5.83" ElseIf Controls(nombouton).Caption = "CA" Then Controls(nombouton).Caption = "" Controls(nombouton).BackColor = 16777215 Controls(nomcase).Value = "" End If End Sub
je voudrais remplacer
par un truc du style
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2nombouton = "F7"
ou quelque chose comme ca mais je ne trouve pas du tout si quelqu un a la solution pourais t-il me la donner
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 nombouton=control name
merci a ucfoutu,mercatog, pour m avoir aider dans mon post precedent
Partager