LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Can I user input to seek out particular files and copy/move them?

The files I work with have names like : "16A-11H1H_JMDI4_265PH.CHP"
where "265PH" is a project name.

I want to write a Excel VBA scrpit, to prompt user to enter a project
name such as "265PH" and have the program to look into a directory to
copy any files with those characters in it. I've read about the

FileCopy Statement
or
FileSystemObject.CopyFile "c:\mydocuments\letters\*.doc",
"c:\tempfolder\"

I think I need do something like "c:\mydocuments\letters\*265PH.CHP",
but "265PH" needs to be a user specified input.

My question is that how do I pass a string variable that contain the
user input characters into the file name when the file name and path is
in double qoutation marks?


Thanks for the help

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
user input decides cell copy range beatrice25 Excel Discussion (Misc queries) 0 May 17th 06 06:51 PM
How can user move in locked worksheet but not copy cell contents? PAT Excel Worksheet Functions 0 April 25th 06 08:40 PM
Copy cell data from workbook based on user input Michael A Excel Programming 7 December 31st 05 03:07 PM
User Input to open multiple files Mike D.[_2_] Excel Programming 2 November 16th 04 09:32 AM
Copy and move info between files Pat Fern Excel Programming 4 May 23rd 04 04:49 PM


All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"