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.

Capturar Nombre de Imagen

publicado
Buenas tardes, en un formulario cargo una imagen de un producto a un control Image y capturo en un label la ruta de la imagen, el Label1 queda de esta manera: C:\Users\fede_\Documents\NUEVA CARPETA\IMAGENES\INSUMOS\TECLADO GENIUS.jpg
Hasta ahí todo bien, ahora necesito capturar solamente el nombre de la imagen sin la ruta en el Label2.
En este ejemplo el Label2 tiene que quedar asi: TECLADO GENIUS.jpg
Como puedo lograrlo?

Featured Replies

publicado

Hola @federtuc

Prueba si es lo que necesitas.

Qué tengas un buen día! Suerte!

Sub capturar_nombre()
Dim cruta1 As String, cpos1 As String, cimg1 As String

cruta1 = "": cruta1 = "C:\Users\fede_\Documents\NUEVA CARPETA\IMAGENES\INSUMOS\TECLADO GENIUS.jpg"
cpos1 = "": cpos1 = InStrRev(cruta1, "\")
cimg1 = "": cimg1 = Right(cruta1, Len(cruta1) - cpos1)
MsgBox "Nombre de la imagen: " & Chr(13) & Chr(13) & cimg1, vbInformation, "Funciones de cadena de texto"

End Sub

 

publicado

Lo mismo que tierra_pampa, pero usando Label1 y Label2:

Label2 = Mid(Label1, InStrRev(Label1, "\") + 1)

 

Editado el por Antoni

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.