OVH Cloud OVH Cloud

[Aide]Question de vocabulaire

2 réponses
Avatar
Franck
Bonjour tout le monde,
Juste une petite question, mais il se peut que j'ai du mal à bien expliquer
mon probleme
Ze probleme: je voudrais savoir avec quels mots (comme critere de
recherche) je dois orienter ma recherche sur google pour le probleme
suivant: ce que je veux c'est que quand je clik sur un checkbox il m'ajouter
du texte dans mon textbox mais si je le décoche alors il m'enleve ce texte
dans mon textbox

par exemple si je clique sur mon checkbox chk_AddCopyTo je veux qu'il
m'ajoute:
[HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\Move To]
@="{C2FBB631-2971-11D1-A18C-00C04FD75D13}"

dans mon textbox, et si je venais à le décocher alors il enlèverait le
texte.

Quelqu'un peut il m'aider, svp
Merci

Cordialement
Franck

2 réponses

Avatar
Bul
un truc comme ça ?

Private Sub Check1_Click()
Dim txt As String
Dim d As Integer
txt "[HKEY_CLASSES_ROOTAllFilesystemObjectsshellexContextMenuHandlersMove
To]@=""{C2FBB631-2971-11D1-A18C-00C04FD75D13}"""
d = InStr(Text1.Text, txt)
If Check1.Value Then
If d <= 0 Then
Text1.Text = Text1.Text & txt
End If
Else
If d > 0 Then
Text1.Text = Left$(Text1.Text, d - 1) & Right$(Text1.Text,
Len(Text1.Text) - (d - 1 + Len(txt)))
End If
End If
End Sub

sûrement à "finir". @+
Avatar
Franck
Merci pour ta soluce
C'est exactement ce que je veux. Merci c'est COOOOOOOLLLLLLLLLLLl


"Bul" a écrit dans le message de
news:O$
un truc comme ça ?

Private Sub Check1_Click()
Dim txt As String
Dim d As Integer
txt > "[HKEY_CLASSES_ROOTAllFilesystemObjectsshellexContextMenuHandlersMove
To]@=""{C2FBB631-2971-11D1-A18C-00C04FD75D13}"""
d = InStr(Text1.Text, txt)
If Check1.Value Then
If d <= 0 Then
Text1.Text = Text1.Text & txt
End If
Else
If d > 0 Then
Text1.Text = Left$(Text1.Text, d - 1) & Right$(Text1.Text,
Len(Text1.Text) - (d - 1 + Len(txt)))
End If
End If
End Sub

sûrement à "finir". @+