Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ingreso de datos a textbox repetando mayusculas y minusculas de nombres propios

publicado

Saludos cordiales compañeros, me veo en la necesidad de seguir aprendiendo y nutriendome de sus conocimientos en lo referente a excel, mi consulta es la siguiente me gustaria que me apoyen con un problema que tengo al ingresar datos en un textbox de una manera determinada, me gustaria que al ingresar datos automaticamente me cambie la primera letra en mayusculas y las demas en minusculas con sus respectivos espacios, ya que son nombres propios, Muchas Gracias de antemano por su ayuda. Saludos

PD: Adjunto un archivo en el que estaba haciendo unas pruebas. Gracias

Ingreso.rar

Featured Replies

publicado

Prueba con este código:


If Len(TextBox1.Text) > 1 Then
espacio = Mid(TextBox1.Text, Len(TextBox1.Text) - 1, 1)
If espacio = " " Then TextBox1.Text = Mid(TextBox1.Text, 1, Len(TextBox1.Text) - 1) & UCase(Mid(TextBox1.Text, Len(TextBox1.Text), 1))
Else
TextBox1.Text = UCase(TextBox1.Text)
End If
[/CODE]

Un saludo,

Tese

publicado

Guau señor TESE1969

Excelente el codigo y solucion. yo lo puse en el evento KeyPress de un textbox y funciona muy bien.

La variable espacio como la declara? String?

Saludos.

publicado
  • Autor

Genial tetese1969, me funciono perfectamente.....muchas gracias por el apoyo. Saludos

- - - - - Mensaje combinado - - - - -

Respondiendo a la pregunta de enigma25 declarando la variable seria de la siguiente forma:

Option Explicit

Dim espacio As String
Private Sub TextBox1_Change()
If Len(TextBox1.Text) > 1 Then
espacio = Mid(TextBox1.Text, Len(TextBox1.Text) - 1, 1)
If espacio = " " Then TextBox1.Text = Mid(TextBox1.Text, 1, Len(TextBox1.Text) - 1) & UCase(Mid(TextBox1.Text, Len(TextBox1.Text),1))
Else
TextBox1.Text = UCase(TextBox1.Text)
End If
End Sub
[/PHP]

Saludos, doy por cerrado el tema

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.