Y
Yvon
Guest
Salut Charly,
Je reviens vers toi concernant mon histoire de textbox avec backcolor changeant :
Lien supprimé
J'ai un souci je n'arrive pas à l'adapter à mon appli qui comporte plusieures feuilles, je pense que le code du USF, ne trouve pas la feuille 1, ou est le menu déroulant je te livre le code en question:
rivate Sub UserForm_Initialize()
With Me
' Initialisation par défaut des 3 TextBox(es)
TextBox1.BackColor = &HFFFFFF
.TextBox1.Enabled = True
.TextBox2.BackColor = &HFFFFFF
.TextBox2.Enabled = True
.TextBox3.BackColor = &HFFFFFF
.TextBox3.Enabled = True
' Puis en fonction de la valeur retournée par le menu déroulant
' (choix dans la variable déclarée Public : IndiceListe)
Select Case IndiceListe
Case 30
With multiprest.TextBox2
.BackColor = &HFF&
.Enabled = False
End With
Case 31
With .TextBox3
.BackColor = &HFF&
.Enabled = False
End With
Case 32
With .TextBox1
.BackColor = &HFF&
.Enabled = False
End With
With .TextBox3
.BackColor = &HFF&
.Enabled = False
End With
Case 33
With .TextBox1
.BackColor = &HFF&
.Enabled = False
End With
End Select
End With
End Sub
J'ai essayer de coller une références à la bonne feuille et je n'y suis pas arrivé, peut tu m'aider
a++
Yvon
Je reviens vers toi concernant mon histoire de textbox avec backcolor changeant :
Lien supprimé
J'ai un souci je n'arrive pas à l'adapter à mon appli qui comporte plusieures feuilles, je pense que le code du USF, ne trouve pas la feuille 1, ou est le menu déroulant je te livre le code en question:
rivate Sub UserForm_Initialize()
With Me
' Initialisation par défaut des 3 TextBox(es)
TextBox1.BackColor = &HFFFFFF
.TextBox1.Enabled = True
.TextBox2.BackColor = &HFFFFFF
.TextBox2.Enabled = True
.TextBox3.BackColor = &HFFFFFF
.TextBox3.Enabled = True
' Puis en fonction de la valeur retournée par le menu déroulant
' (choix dans la variable déclarée Public : IndiceListe)
Select Case IndiceListe
Case 30
With multiprest.TextBox2
.BackColor = &HFF&
.Enabled = False
End With
Case 31
With .TextBox3
.BackColor = &HFF&
.Enabled = False
End With
Case 32
With .TextBox1
.BackColor = &HFF&
.Enabled = False
End With
With .TextBox3
.BackColor = &HFF&
.Enabled = False
End With
Case 33
With .TextBox1
.BackColor = &HFF&
.Enabled = False
End With
End Select
End With
End Sub
J'ai essayer de coller une références à la bonne feuille et je n'y suis pas arrivé, peut tu m'aider
a++
Yvon