Please read the information on the site
Download the example workbook to test the code
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Yossy" <(E-Mail Removed)> wrote in message news:069B2F7A-A535-4E62-ACEC-(E-Mail Removed)...
> please i tried using this code
> Sub RDB_Copy_Sheet()
> Dim myFiles As Variant
> Dim myCountOfFiles As Long
>
> myCountOfFiles = Get_File_Names( _
> MyPath:="C:\desktop\sample", _
> 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_Sheet _
> PasteAsValues:=True, _
> SourceShName:="", _
> SourceShIndex:=2, _
> myReturnedFiles:=myFiles
>
> End Sub
>
> and I get this error, sub or function not defined
>
> Thanks for your help.