propiedad Style.Name (Excel)
Devuelve un valor de tipo String que representa el nombre del objeto.
Sintaxis
expresión. Nombre
Expresión Variable que representa un objeto Style .
Ejemplo:
En este ejemplo se muestra el nombre del estilo uno de la hoja activa, primero en el lenguaje de la macro y después en el idioma del usuario.
With ActiveWorkbook.Styles(1)
MsgBox "The name of the style: " & .Name
MsgBox "The localized name of the style: " & .NameLocal
End With
En el ejemplo siguiente se muestra el nombre del objeto ListObject predeterminado en Sheet1 del libro activo.
Sub Test
Dim wrksht As Worksheet
Dim oListObj As ListObject
Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
Set oListObj = wrksht.ListObjects(1)
MsgBox oListObj.Name
End Sub
Soporte técnico y comentarios
¿Tiene preguntas o comentarios sobre VBA para Office o esta documentación? Vea Soporte técnico y comentarios sobre VBA para Office para obtener ayuda sobre las formas en las que puede recibir soporte técnico y enviar comentarios.