MyTetra Share
Делитесь знаниями!
Время создания: 16.03.2019 23:43
Раздел: Разные закладки - VBA - VBA / Excel / Access / Word - File Path
Запись: xintrea/mytetra_db_adgaver_new/master/base/15129959773swkpial1p/text.html на raw.githubusercontent.com
  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\username\Desktop\qw\qw")

End Sub



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