• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Move all files in folder to another directory folder

jk51

Member
Hi,

See file attached. Need help to modify the program.

There are 2 directories folder one is 'copy from' and other is 'copy to' and this program work only if you know the directory and paste in these cell C3 and C5 and click the button 'move files' to run.

I want to modify the VBA (excel 2010) program :

1) Copy from: go to C3 cell and get folder to browse the folder you want to copy from. select and the file directory appear in Cell C3.
2) Copy from: go to C5 cell and get folder to browse the folder you want to copy to. select and the file directory appear in Cell C5.
3) Click the button 'moves files' to run.

Thanks

Mr Singh
 

Attachments

Marc L

Excel Ninja
Hi, paste this event code to worksheet module :​
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
        Dim obj As Object
    If Target.Address = "$C$3" Or Target.Address = "$C$5" Then
         Cancel = True
        Set obj = CreateObject("Shell.Application").BrowseForFolder(0, "", 1, "")
     If Not obj Is Nothing Then Target.Value = obj.Self.Path & "\": Set obj = Nothing
    End If
End Sub
Do you like it ? So thanks to click on bottom right Like !
 

jk51

Member
Hi Marc thank you for your reply. Don't understand where to paste your code to my program. Can you shown me. Thanks.
 

Marc L

Excel Ninja

Paste it into Sheet1 module.

A double click on cell C3 or C5 will ask to choose a folder.
 

Monty

Well-Known Member
Hello Marc...


Interesting way of explaining things...How to do this animation effect.
 

Marc L

Excel Ninja

Hi Monty ! There are a lot a free screen capture software on web !

jk51, where do you paste the code ?
Try also on a new workbook (after closing Excel, restart Windows) …
 

jk51

Member
Hi Marc, I just managed to work. Thank you very much for your help. I like your demo. Which screen capture software did you download from?
 

Marc L

Excel Ninja

It depends on what is already installed on computer I grabbed,
like ScreenToGif for example …
 

Marc L

Excel Ninja

No as I'm not the first on this forum to post a visualization …
It is not a « how to » but just to illustrate code works on my side.​
 

Monty

Well-Known Member
Hello Marc.

May be....But for me it's first time seeing showing demo with animation.

Thanks
Monty
 
Top