Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Public Function GetFileProperty(myFile As String, myType As String) As String 'This creates an instance of the MS Scripting Runtime FileSystemObject class Set oFS = CreateObject("Scripting.FileSystemObject") If oFS.FileExists(myFile) Then Select Case UCase(Trim(myType)) Case "CREATED" GetFileProperty = oFS.GetFile(myFile).DateCreated Case "MODIFIED" GetFileProperty = oFS.GetFile(myFile).DateLastModified Case "ACCESSED" GetFileProperty = oFS.GetFile(myFile).DateLastAccessed Case "SIZE" GetFileProperty = oFS.GetFile(myFile).Size 'Case Else 'GetFileProperty = "txt" End Select Else GetFileProperty = "File does not exist" End If End Function Public Sub SperiamoLoop() Dim MyCell As Variant, Rng As Range Dim myFile As String, myType As String Set Rng = Sheets("Sheet1").Range("A2:A4") For Each MyCell In Rng myFile = MyCell.Value If myFile <> "" Then For i = 1 To 4 myType = Sheets("Sheet1").Range("A1").Offset(0, i) MyCell.Offset(0, i) = GetFileProperty(myFile, myType) Next End If Next End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|I would like to delete a cell in excel from which I think it has no use||2||33|
|move line without macro or copy/paste||6||45|
|2 Global Vars, 1 List Box||4||34|
|Excel Index/Match issue||4||18|
Join the community of 500,000 technology professionals and ask your questions.