Ah ha...
It's working like a champ now...
The problem was objFile.Close - apparently I don't need to Close this?
"deko" <dje422@hotmail.com> wrote in message
news:Ed7Ab.66132$C97.39248@newssvr25.news.prodigy. com...[color=blue]
> Hi and thanks for the reply.
>
> I tried this:
>
> Dim objFile as Object
> Set objFile = CreateObject("Scripting.FileSystemObject")
> objFile.MoveFile strSource, strDestination
> objFile.Close
>
> and got:
>
> Error Number 438: Object doesn't support this property or method
>
> I also tried:
>
> Dim objFile as Object
> Set objFile = CreateObject("varFile.FileSystemObject")
> objFile.MoveFile strSource, strDestination
> objFile.Close
>
> and that didn't work either...
>
> Yes, I am trying to MoveFile now, rather than CopyFile, but the results[/color]
are[color=blue]
> the same either way.
>
>
> "Danny J. Lesandrini" <dlesandrini@hotmail.com> wrote in message
> news:bqqnn0$24vh4v$1@ID-82595.news.uni-berlin.de...[color=green]
> > Try this ...
> >
> > Dim objScript
> > Set objScript= CreateObject("Scripting.FileSystemObject")
> > objScript.CopyFile strSource, strTarget
> >
> > --
> >
> > Danny J. Lesandrini
> >
dlesandrini@hotmail.com
> >
http://amazecreations.com
> >
> >
> > "deko" <dje422@hotmail.com> wrote in message
> > news:uZ%zb.65970$205.40187@newssvr25.news.prodigy. com...[color=darkred]
> > > Okay, so I got the common dialog working.
> > >
> > > but how to create object to copy selected files?
> > >
> > > Dim d As Object
> > > Dim fDialog As Office.FileDialog
> > >
> > > Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
> > >
> > > If fDialog.Show = True Then
> > > For Each varFile In fDialog.SelectedItems
> > > Set d = CreateObject("FileSystemObject") '<<<=== ???
> > > d.CopyFile varFile, strOrgDir
> > > d.Close
> > > Next
> > > End If
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]