Dim di As New IO.DirectoryInfo("Your directory path")
Debug.Print("di: " + di.ToString)
Dim diar1 As IO.FileInfo() = di.GetFiles()
Dim dra As IO.FileInfo
'list the names of all files in the specified directory
For Each dra In diar1
lstFiles.Items.Add(dra) 'all files present in the directory are viewed in list box
Private Sub ListFiles(strPath As String, Optional Extention As String)
'Leave Extention blank for all files'
Dim File As String
If Right$(strPath, 1) <> "\" Then strPath = strPath & "\"
If Trim$(Extention) = "" Then
Extention = "*.*"
ElseIf Left$(Extention, 2) <> "*." Then
Extention = "*." & Extention
File = Dir$(strPath & Extention)
Do While Len(File)
File = Dir$
Private Sub Command1_Click()
ListFiles "D:\musicfolder", "*"
' Or ListFiles "D:\musicfolder", "" leave it blank to get all files'
Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...