Private Sub Command1_Click() 'tilføjer dem i en ListBox (List1) LocalDir "C:\WINDOWS", "23-02-02" End Sub
Public Function LocalDir(DirPath As String, strDato As String) On Error Resume Next Dim NextLocal As String Dim FullSpec As String
ChDrive DirPath ChDir DirPath
If Len(CurDir()) = 3 Then FullSpec = CurDir() & "*.*" Else FullSpec = CurDir() & "\*.*" End If
NextLocal = Dir(FullSpec, vbDirectory + vbNormal)
Do While NextLocal <> "" If Len(CurDir()) = 3 Then FullSpec = CurDir() & StrConv(NextLocal, vbProperCase) Else FullSpec = CurDir() & "\" & NextLocal End If If (GetAttr(FullSpec) And vbDirectory) = vbDirectory Then If Left$(FileDateTime(FullSpec), 8) = strDato Then List1.AddItem NextLocal 'Her for Dir End If Else If Left$(FileDateTime(FullSpec), 8) = strDato Then List1.AddItem NextLocal 'Her for File End If End If NextLocal = Dir Loop End Function
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.