MyTetra Share
Делитесь знаниями!
Folder
16.03.2019
23:43
Раздел: !Закладки - VBA - VBA / Excel / Access / Word - File Path
  1. VBA / Excel / Access / Word
  2. File Path
  3. Folder



1.

Folder information

Sub cmdFolderInfo_Click()

Dim myFileSystemObject As FileSystemObject, curFolder As folder

Set myFileSystemObject = New FileSystemObject

Set curFolder = myFileSystemObject.GetFolder("c:\Java_Dev\")

With curFolder

Debug.Print "Created: " & .DateCreated & vbCrLf

Debug.Print "Last Accessed: " & .DateLastAccessed & vbCrLf

Debug.Print "Last Modified: " & .DateLastModified & vbCrLf

Debug.Print "Size: " & Format(.Size / 1000#, "#0.00") & "KB"

End With


Set myFileSystemObject = Nothing

Set curFolder = Nothing

End Sub






2.

Create folder

Sub cmdCreateFolder_Click()

Dim myFileSystemObject As FileSystemObject


Set myFileSystemObject = New FileSystemObject

myFileSystemObject.CreateFolder ("c:\ttt")

End Sub

Sub cmdCreateFolder_Click()

Dim myFileSystemObject As Object 'As FileSystemObject

' Dim objFSO As Object

Set myFileSystemObject = CreateObject("Scripting.FileSystemObject")

' Set myFileSystemObject = New FileSystemObject

myFileSystemObject.CreateFolder ("d:\LocalData\au11101\Desktop\qw\qw")

End Sub



Так же в этом разделе:
 
MyTetra Share v.0.52
Яндекс индекс цитирования