Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello.
I have a folder that has 300 excel spreadsheets in it. I take these 300 spreadsheets and combine them into 1 spreadsheet buy going to run"cmd" prompt and then using dos commands to copy all 300 into 1 spreadsheet. Is there a macro that will do this all for me so I don't have to everytime go out to "cmd" prompt and type the dos commands? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can find a example here that use Shell
http://www.rondebruin.nl/csv.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Hello. I have a folder that has 300 excel spreadsheets in it. I take these 300 spreadsheets and combine them into 1 spreadsheet buy going to run"cmd" prompt and then using dos commands to copy all 300 into 1 spreadsheet. Is there a macro that will do this all for me so I don't have to everytime go out to "cmd" prompt and type the dos commands? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you. Thank You.
Although I'm having trouble changing the code so that it will save it in a different location other than My Documents. Can you help. I really need to do somethign to pay you back. Your site is wonderful. Is there anything I can do to support you? "Ron de Bruin" wrote: You can find a example here that use Shell http://www.rondebruin.nl/csv.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Hello. I have a folder that has 300 excel spreadsheets in it. I take these 300 spreadsheets and combine them into 1 spreadsheet buy going to run"cmd" prompt and then using dos commands to copy all 300 into 1 spreadsheet. Is there a macro that will do this all for me so I don't have to everytime go out to "cmd" prompt and type the dos commands? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dtown
You can change DefPath = Application.DefaultFilePath To this for example DefPath = "C:\Data" I really need to do somethign to pay you back. Your site is wonderful. Is there anything I can do to support you? Making you happy is my paycheck Have fun with Excel and enjoy all the good stuff in the newsgroups -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Thank you. Thank You. Although I'm having trouble changing the code so that it will save it in a different location other than My Documents. Can you help. I really need to do somethign to pay you back. Your site is wonderful. Is there anything I can do to support you? "Ron de Bruin" wrote: You can find a example here that use Shell http://www.rondebruin.nl/csv.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Hello. I have a folder that has 300 excel spreadsheets in it. I take these 300 spreadsheets and combine them into 1 spreadsheet buy going to run"cmd" prompt and then using dos commands to copy all 300 into 1 spreadsheet. Is there a macro that will do this all for me so I don't have to everytime go out to "cmd" prompt and type the dos commands? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron.
One more question if you don't mind? Can I specify in the code to only copy specific files from the folder. Right now the code copies all the .csv files in the folder I choose. For example, can I specify to only copy the following files *softwareinstalled.csv Everything else is working fine. I appreciate your help. "Ron de Bruin" wrote: Hi Dtown You can change DefPath = Application.DefaultFilePath To this for example DefPath = "C:\Data" I really need to do somethign to pay you back. Your site is wonderful. Is there anything I can do to support you? Making you happy is my paycheck Have fun with Excel and enjoy all the good stuff in the newsgroups -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Thank you. Thank You. Although I'm having trouble changing the code so that it will save it in a different location other than My Documents. Can you help. I really need to do somethign to pay you back. Your site is wonderful. Is there anything I can do to support you? "Ron de Bruin" wrote: You can find a example here that use Shell http://www.rondebruin.nl/csv.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Hello. I have a folder that has 300 excel spreadsheets in it. I take these 300 spreadsheets and combine them into 1 spreadsheet buy going to run"cmd" prompt and then using dos commands to copy all 300 into 1 spreadsheet. Is there a macro that will do this all for me so I don't have to everytime go out to "cmd" prompt and type the dos commands? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dtown
Yes try it Change this line Print #1, "Copy " & Chr(34) & foldername & "*.csv" & Chr(34) & " " & TXTFileName -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Ron. One more question if you don't mind? Can I specify in the code to only copy specific files from the folder. Right now the code copies all the .csv files in the folder I choose. For example, can I specify to only copy the following files *softwareinstalled.csv Everything else is working fine. I appreciate your help. "Ron de Bruin" wrote: Hi Dtown You can change DefPath = Application.DefaultFilePath To this for example DefPath = "C:\Data" I really need to do somethign to pay you back. Your site is wonderful. Is there anything I can do to support you? Making you happy is my paycheck Have fun with Excel and enjoy all the good stuff in the newsgroups -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Thank you. Thank You. Although I'm having trouble changing the code so that it will save it in a different location other than My Documents. Can you help. I really need to do somethign to pay you back. Your site is wonderful. Is there anything I can do to support you? "Ron de Bruin" wrote: You can find a example here that use Shell http://www.rondebruin.nl/csv.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Dtown Dawg" wrote in message ... Hello. I have a folder that has 300 excel spreadsheets in it. I take these 300 spreadsheets and combine them into 1 spreadsheet buy going to run"cmd" prompt and then using dos commands to copy all 300 into 1 spreadsheet. Is there a macro that will do this all for me so I don't have to everytime go out to "cmd" prompt and type the dos commands? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i copy protected spreadsheet in a macro | Excel Discussion (Misc queries) | |||
Macro to copy and append spreadsheet changes to new spreadsheet | Excel Discussion (Misc queries) | |||
How to copy the same formulas in a spreadsheet -Macro? | Excel Worksheet Functions | |||
Macro to copy 2 columns to new spreadsheet each new day | Excel Programming | |||
Link multiple spreadsheets to one central spreadsheet using a macro | Excel Programming |