Bienvenido a la mayor comunidad de usuarios EXCEL

Regístrate gratis ahora para ver contenidos y descargas sin restricciones!

Regístrate gratis

Macro para ingresar un formato personalizado a un textbox

Alexcocote

New member
Registrado
24 Oct 2019
Mensajes
4
Buenas

miren tengo que ingresar este formato a un textbox y lo hago mediante el evento exit y update y no me da resultado
el formato es if not me.textbox30 = format(me.textbox30 , "###-####...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
Alexcocote dijo:
... tengo que ingresar este formato a un textbox ...
if not me.textbox30 = format(me.textbox30 , "###-#### ####") then
msgbox("asfhjkaskjf"),vbinformation
end if
pero cuando...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
Héctor Miguel dijo:
prueba de esta forma:
Código:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
  If Not TextBox1.Text Like "###-#### ####" Then
    Cancel = True
    MsgBox...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
Volver
Arriba