Lista de vínculos y fecha última grabación

Hola, quería hacer una macro que me listara todos los vínculos que tiene un excel y que además me pusiera al lado la fecha de ultima grabación de dichos ficheros.

A ver si me podéis ayudar.

Muchas gracias 

1 respuesta

Respuesta

Para realizar la macro me puedes explicar cómo insertaste el vínculo.

Gracias, ya me han pasado este código que funciona perfecto.

Un saludo

Sub ListadoLinks()
Dim aLinks, i%, j%, fs
aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
If IsEmpty(aLinks) Then Exit Sub
Application.ScreenUpdating = False
Set fs = CreateObject("Scripting.FileSystemObject")
Workbooks.Add xlWBATWorksheet
For i = 1 To UBound(aLinks)
  j = InStrRev(aLinks(i), "\")
  Cells(i, "a") = Left(aLinks(i), j - 1)
  ActiveSheet.Hyperlinks.Add Anchor:=Cells(i, "b"), _
    Address:=aLinks(i), TextToDisplay:=Mid(aLinks(i), j + 1, 300)
  Cells(i, "c") = fs.GetFile(aLinks(i)).DateLastModified
Next i
With [a1].CurrentRegion
  .Columns(3).NumberFormat = "dd/mmm/yy hh:mm:ss"
  .Font.Name = "Courier New": .Columns.AutoFit: .RowHeight = 17
End With
Application.ScreenUpdating = True
Set fs = Nothing
Set aLinks = Nothing
End Sub

Gracias por compartirlo

saludos

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas