Link to home
Start Free TrialLog in
Avatar of cwbarrett
cwbarrett

asked on

run FileCopy code from a string

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
SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cwbarrett
cwbarrett

ASKER

Thank you for your help.  Used the long-hand version and it works great.
Thank you.  Worked out great.
you're welcome, Charlie ~ happy to help