We help IT Professionals succeed at work.

run FileCopy code from a string

cwbarrett
cwbarrett asked
on
147 Views
Last Modified: 2017-04-25
Hi.

I am trying to build code for filecopy  and cannot seem to build the command string properly. I have 3 strings with the following info:
destinationlocation  (text field in a form containing "C:\%userprofile%\Dropbox\<subfoldername>")
destinationfolder  (text field in a form containing "<destination folder>" -- this is a sub-folder of "destinationlocation")
destinationfilename (text field in a form containing "<destinationfilename>"

What is the correct way to build a command string to execute this using VBA filecopy?

(note:  Source file location and name is always the same... not in text field)

Thank for any help. Charlie
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Remote Training and Programming
CERTIFIED EXPERT
Top Expert 2015
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Thank you for your help.  Used the long-hand version and it works great.
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and Programming
CERTIFIED EXPERT
Top Expert 2015

Commented:
you're welcome, and awesome!

Author

Commented:
Thank you.  Worked out great.
crystal (strive4peace) - Microsoft MVP, AccessRemote Training and Programming
CERTIFIED EXPERT
Top Expert 2015

Commented:
you're welcome, Charlie ~ happy to help