Thread: moving folders
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default moving folders

You have to run CallMove, not MoveAfolder.

However, I offered it as a sample of how you might fix your own macro.

--
Regards,
Tom Ogilvy

"Gary" wrote in message
...
When I tried it, it brought up a list of macros to select
and run. Any idea why or how to fix?
-----Original Message-----
This worked for me:

Sub MoveAFolder(Drivespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.MoveFolder Drivespec, "\\logfs03\Users\Ogilvtw\TT2

\"
End Sub

Sub CallMove()
Drivespec = "\\logfs04\Dpl-div\TT1"
MoveAFolder Drivespec
End Sub

--
Regards,
Tom Ogilvy


"Gary" wrote in

message
...
I am trying to move a folder from "quotes" to "sales"

and
cannot get it right. What is wrong?
Sub Move()
Dim sFolder As Scripting.folder
Dim sDestination As String
Set sFolder = "\\quotes\" & ActiveSheet.Range("S7")
& "\" & ActiveSheet.Range("h14")
sDestination = "\\Sales\" & ActiveSheet.Range("S7")
& "\" & ActiveSheet.Range("h14")
MoveFolder sFolder, sDestination
End Sub



.