Compartir por


Propiedad Report.Index (Project)

Obtiene el índice de un informe personalizado en la colección Reports . Long de sólo lectura.

Sintaxis

expresión. Índice

Expresión Variable que representa un objeto "Report".

Ejemplo:

En el ejemplo siguiente se enumeran el índice y el nombre de cada informe personalizado de un proyecto.

Sub ListCustomReports()
    Dim oReport As Report
    Dim msg As String
    Dim msgBoxTitle As String
    msg = ""
    msgBoxTitle = "Custom reports in '" & ActiveProject.Name & "'"
    
    For Each oReport In ActiveProject.Reports
        msg = msg & oReport.Index & oReport.Name & vbCrLf
    Next oReport
        
    If ActiveProject.Reports.Count > 0 Then
        MsgBox Prompt:=msg, Title:=msgBoxTitle
    Else
        MsgBox Prompt:="This project contains no custom reports.", _
            Title:=msgBoxTitle
    End If
End Sub

Valor de propiedad

INT32

Consulte también

Objeto Report ObjectReports

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.