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.

Codigo VBA ocultar imagen

publicado

Tengo un problema en mi codigo VBA es el siguiente ya que me oculta todas las imagenes en mi hoja y solo quiero que me oculte una que es el nombre de la imagen que lo pongo en la celda J23:

Private Sub Worksheet_Change(ByVal Target As Range)

    Rango = "J23"

    If Not Application.Intersect(Target, Range(Rango)) Is Nothing Then

        For i = 1 To ActiveSheet.Shapes.Count

            If ActiveSheet.Shapes(i).Name <> Range("J23").Text Then

               ActiveSheet.Shapes(i).Visible = False

            Else

               ActiveSheet.Shapes(i).Visible = True

            End If

        Next

     End If

End Sub

Código_QR.png

Editado el por aSeik01

Featured Replies

publicado

Prueba el siguiente codigo haber si es lo que quieres

Private Sub Worksheet_Change(ByVal Target As Range)

    Rango = "J23"
'
    If Not Application.Intersect(Target, Range(Rango)) Is Nothing Then

        For i = 1 To ActiveSheet.Shapes.Count

            If ActiveSheet.Shapes(i).Name <> Range("J23").Text Then

               ActiveSheet.Shapes(i).Visible = True

            Else

               ActiveSheet.Shapes(i).Visible = False

            End If

        Next

     End If

End Sub

si rango es igual  a vacio se ven todas las imagenes solo se oculta la que se pone en j23

publicado
  • Autor

Gracias por la ayuda me funciono!

Tambien habia implementado este codigo para solucionarlo:

Private Sub Worksheet_Change(ByVal Target As Range)

    Dim Rango As String

    Rango = "J23"

    If Not Application.Intersect(Target, Range(Rango)) Is Nothing Then

        For i = 1 To ActiveSheet.Shapes.Count

            ActiveSheet.Shapes(i).Visible = True

            

        Next i

        

        For i = 1 To ActiveSheet.Shapes.Count

            If ActiveSheet.Shapes(i).Name = Range("J23").Text Then

                ActiveSheet.Shapes(i).Visible = False

                

                Exit For

                

            End If

            

        Next i

        

    End If

    

End Sub

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.