• Thinking of it, it could be faster:

    For Each clave In tdf.indexes

    If clave.Primary = True Then

    Campo_Actual = clave.Fields(0).Name

    Exit For ' No need to keep looking when the answer is found.

    End If

    Next

    Have a nice day!