Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Copy an excel file to new created folder

Hello VB addicts!
I programmed a macro to create folders on the main directory(ex: S:
directory)
When a user enters a file number in excel, a batch of folder will be
created.
For each file folder batch created, I will need to include an excel
file. How can I automate this procedure?
Currently the excel file is saved on the S: directory.

Thanks in advance for you help and continue to enjoy life!
myrna



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Copy an excel file to new created folder

Look up "Workbooks Collection" in Excel Help. Look at its methods like Add,
Save and SaveAs.

"Myrna Rodriguez" wrote in message
...
Hello VB addicts!
I programmed a macro to create folders on the main directory(ex: S:
directory)
When a user enters a file number in excel, a batch of folder will be
created.
For each file folder batch created, I will need to include an excel
file. How can I automate this procedure?
Currently the excel file is saved on the S: directory.

Thanks in advance for you help and continue to enjoy life!
myrna



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Copy an excel file to new created folder

Try the following:

MkDir path

where path is a string. You can assemble the string on the
fly by concatenating the user input onto the rest of your
path statement as necessary.

Then create your file by using the SaveAs or SaveCopyAs
commands (check help). I save a copy of a workbook by
doing the following:

fileName = MyPath & SaveFileName & ".xls"

ActiveWorkbook.SaveCopyAs (fileName)

Where SaveFileName is a variable I use to assign a user
input value. fileName is also a variable that includes the
full path to the directory where the file will be saved.

Hope that helps!

Kevin
-----Original Message-----
Hello VB addicts!
I programmed a macro to create folders on the main

directory(ex: S:
directory)
When a user enters a file number in excel, a batch of

folder will be
created.
For each file folder batch created, I will need to

include an excel
file. How can I automate this procedure?
Currently the excel file is saved on the S: directory.

Thanks in advance for you help and continue to enjoy life!
myrna



*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.

Reply
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
i created a macro in a xlstart folder.how do i do to insert in too Roughar Excel Discussion (Misc queries) 1 October 21st 09 01:48 PM
how do I copy an Excel file created in XP to Vista on a new comput Yvette Excel Discussion (Misc queries) 0 July 16th 09 05:39 PM
Open and copy all workbook sheets in a folder to a master file [email protected] Excel Discussion (Misc queries) 0 November 2nd 06 04:29 PM
save workbook created from templete to a specific folder imh Excel Discussion (Misc queries) 1 June 2nd 06 11:29 PM
Create a copy in the same folder when a file is modified and saved Turboj Excel Discussion (Misc queries) 1 February 21st 06 04:51 AM


All times are GMT +1. The time now is 01:39 AM.

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

About Us

"It's about Microsoft Excel"