TextBox1.SelectionStart = 0 TextBox1.SelectionLength = 9 Variable1 = TextBox1.SelectedText TextBox1.SelectionStart = 9 TextBox1.SelectionLength = 5 Variable2 = TextBox1.SelectedText TextBox1.Text = Variable1 & "_" & Variable2
'permet l'affichage siren frmdetails.txt_siren = frmC1.lblDesc(2) txt_siren.SelectionStart = 0 txt_siren.SelectionLength = 9 variable1 = txt_siren.SelectedText txt_siren.SelectionStart = 9 txt_siren.SelectionLength = 5 variable2 = txt_siren.SelectedText txt_siren.Text = variable1 & "_" & variable2
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questiontxt_siren.SelStart txt_siren.SelLength txt_siren.SelText
chaine = TextBox1.Text If Len(chaine) > 9 Then TextBox1.Text = Format(chaine, String(9, "@") & "_" & String(Len(chaine) - 9, "@")) End If
If KeyAscii = 8 Then Exit Sub If Len(Text1.Text) > 8 And InStr(Text1.Text, "_") 0 Then Text1.SelText "_"