Dim strDestinationFolder As String

Dim strSourceFolder As String

Dim strFile As String

strDestinationFolder = "C:\Another Folder\"

strSourceFolder = "C:\My Data\"

strFile = Dir$(strSourceFolder & "*.XLS")

Do While Len(strFile) > 0

FileCopy strSourceFolder & strFile, strDestinationFolder & strFile

strFile = Dir$()

Loop

--

Doug Steele, Microsoft Access MVP

http://I.Am/DougSteele
(no e-mails, please!)

"Frank Dulk" <(E-Mail Removed)> wrote in message

news:%(E-Mail Removed)...

> They are files *.XLS

>

> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> escreveu na

> mensagem

> news:(E-Mail Removed)...

>> You have to copy them one-by-one. If you're wanting to copy all files

>> matching a particular pattern, use the Dir function to determine the

> files.

>>

>> --

>> Doug Steele, Microsoft Access MVP

>> http://I.Am/DougSteele

>> (no e-mails, please!)

>>

>>

>>

>> "Frank Dulk" <(E-Mail Removed)> wrote in message

>> news:%(E-Mail Removed)...

>> >I understand.

>> > But as it would be to copy all the files?

>> >

>> > "Paul Overway" <(E-Mail Removed)-solutions.com> escreveu na

>> > mensagem

>> > news:%(E-Mail Removed)...

>> >> FileCopy strSource, strDestination

>> >>

>> >> You don't understand that?

>> >>

>> >> --

>> >> Paul Overway

>> >> Logico Solutions

>> >> http://www.logico-solutions.com

>> >>

>> >>

>> >> "Frank Dulk" <(E-Mail Removed)> wrote in message

>> >> news:%(E-Mail Removed)...

>> >> > Did I already try but didn't I get, as it would be the code?

>> >> >

>> >> > "Paul Overway" <(E-Mail Removed)-solutions.com> escreveu na

>> >> > mensagem

>> >> > news:%(E-Mail Removed)...

>> >> >> Did you look at help for FileCopy?

>> >> >>

>> >> >> --

>> >> >> Paul Overway

>> >> >> Logico Solutions

>> >> >> http://www.logico-solutions.com

>> >> >>

>> >> >>

>> >> >> "Frank Dulk" <(E-Mail Removed)> wrote in message

>> >> >> news:%23$(E-Mail Removed)...

>> >> >> > How do I do to copy several files of a folder for other, using

> VBA?

>> >> >> >

>> >> >> >

>> >> >>

>> >> >>

>> >> >

>> >> >

>> >>

>> >>

>> >

>> >

>>

>>

>

>