Private Sub CommandButton1_Click()
Dim myFiles As Variant
Dim myCountOfFiles As Long
myCountOfFiles = Get_File_Names( _
MyPath:="D:\Documents and Settings\excel\My Documents\New Folder (3)", _
Subfolders:=False, _
ExtStr:="*.xl*", _
myReturnedFiles:=myFiles)
If myCountOfFiles = 0 Then
MsgBox "No files that match the ExtStr in this folder"
Exit Sub
End If
Get_Data _
FileNameInA:=True, _
PasteAsValues:=True, _
SourceShName:="sheet1", _
SourceShIndex:=1, _
SourceRng:="A2,B2,C2", _
StartCell:="", _
myReturnedFiles:=myFiles
End Sub
Hello all found some code that maybe helpful for my needs but getting a sub not defined error at the Bold & unlined section in the above code. Any thoughts on why?
Thanks
Dim myFiles As Variant
Dim myCountOfFiles As Long
myCountOfFiles = Get_File_Names( _
MyPath:="D:\Documents and Settings\excel\My Documents\New Folder (3)", _
Subfolders:=False, _
ExtStr:="*.xl*", _
myReturnedFiles:=myFiles)
If myCountOfFiles = 0 Then
MsgBox "No files that match the ExtStr in this folder"
Exit Sub
End If
Get_Data _
FileNameInA:=True, _
PasteAsValues:=True, _
SourceShName:="sheet1", _
SourceShIndex:=1, _
SourceRng:="A2,B2,C2", _
StartCell:="", _
myReturnedFiles:=myFiles
End Sub
Hello all found some code that maybe helpful for my needs but getting a sub not defined error at the Bold & unlined section in the above code. Any thoughts on why?
Thanks