I have the current VBA code for a function within Excel:
This function is perfectly providing the last saved date of a file link placed in the worksheet. I want this code to be modified to serve the exact same function as the code above but for the “Author” associated with the date it is providing.
Background: I am in charge of creating an overview form of a work instruction library for my department. When we need to review work instructions that are out of date, this workbook would allow the capability to see when the last modification date occurred and by who it was occurred by.
Any help on this would be AMAZING!!!!!
Code:
Sub test()
Const strFullName As String = "C:\My Documents\nosuchbook.xls"
If FileExists(strFullName) Then
MsgBox FileLastModified(strFullName)
Else
MsgBox "Cannot find the file : " & vbNewLine & strFullName
End If
End Sub
Private Function FileExists(fname) As Boolean
Dim x As String
x = Dir(fname)
If x <> "" Then FileExists = True _
Else FileExists = False
End Function
Function FileLastModifiedDate(strFullFileName As String)
Dim fs As Object, f As Object, s As String
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(strFullFileName)
s = UCase(strFullFileName) & vbCrLf
s = f.datelastmodified
FileLastModifiedDate = s
Set fs = Nothing: Set f = Nothing
End Function
This function is perfectly providing the last saved date of a file link placed in the worksheet. I want this code to be modified to serve the exact same function as the code above but for the “Author” associated with the date it is providing.
Background: I am in charge of creating an overview form of a work instruction library for my department. When we need to review work instructions that are out of date, this workbook would allow the capability to see when the last modification date occurred and by who it was occurred by.
Any help on this would be AMAZING!!!!!