Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
Por osvaldomp
#73085
Disponibilize o arquivo Excel com a TextBox.
Por osvaldomp
#73087
FÓRUM ZUADO DE NOVO! NÃO ACEITA FORMATAÇÃO DE TEXTO, NÃO ACEITA INSERÇÃO DE CODE, NÃO ACEITA "OBRIGADO".

Private Sub TextBox1_Change()
If TextBox1.Text = "" Then Exit Sub
If Len(TextBox1.Text) <= 4 Then
If Not Right(TextBox1.Text, 1) Like "[a-zA-Z]" Then 'aceita letras minúsculas e maiúsculas
TextBox1.Text = Left(TextBox1.Text, Len(TextBox1.Text) - 1)
End If
ElseIf Len(TextBox1.Text) = 5 Then
If Not Right(TextBox1.Text, 1) Like "[0-9]" Then
TextBox1.Text = Left(TextBox1.Text, Len(TextBox1.Text) - 1)
End If
Else: TextBox1.Text = Left(TextBox1.Text, Len(TextBox1.Text) - 1)
End If
End Sub

"[A-Z]" ~~~> aceita somente maiúsculas
Por PedroBB
Posts
#73089
osvaldomp escreveu: 23 Mar 2023 às 11:19 FÓRUM ZUADO DE NOVO! NÃO ACEITA FORMATAÇÃO DE TEXTO, NÃO ACEITA INSERÇÃO DE CODE, NÃO ACEITA "OBRIGADO".

Private Sub TextBox1_Change()
If TextBox1.Text = "" Then Exit Sub
If Len(TextBox1.Text) <= 4 Then
If Not Right(TextBox1.Text, 1) Like "[a-zA-Z]" Then 'aceita letras minúsculas e maiúsculas
TextBox1.Text = Left(TextBox1.Text, Len(TextBox1.Text) - 1)
End If
ElseIf Len(TextBox1.Text) = 5 Then
If Not Right(TextBox1.Text, 1) Like "[0-9]" Then
TextBox1.Text = Left(TextBox1.Text, Len(TextBox1.Text) - 1)
End If
Else: TextBox1.Text = Left(TextBox1.Text, Len(TextBox1.Text) - 1)
End If
End Sub

"[A-Z]" ~~~> aceita somente maiúsculas
Sensacional!!!!
Muito obrigado, Osvaldo!

=SE(MÊS(A1)&lt;7;&quot;1º sem&a[…]

Bom Dia Senhores. Tenho uma macro que preciso dei[…]

Free relationships without drama and obligations. […]

Girar Imagem e Zoom

Boa noite Teria alguma forma de dar um &quot;[…]

Valeu. Muito Obrigado!!!!!!!!

Pessoal, Ao clicar no botão Copiar (Guia C[…]

Procv com serro em vba

Resolvido

Bom dia, pessoal! com a data de nascimento e data […]

Estamos migrando para uma comunidade no Discord