Excel VBA - Directory Controls/Codes, File Names with Dates
-
I am just getting started with VBA for Excel and don't knwo the code to get to do the following: 1. Saving a Workbook I am creating with the following format ddmmmyyyy & _Weekly_Forecast.xls in a folder named "Weekly Reports" right under the folder where the master workbook is. The file being saved is generated from a copy/paste of two sheets of the master workbook that is found in the current directory. 2. How to change directory without the need of typing the entire path. Does anything like "~" exist? The problem being I don't want to force users to save the workbook on a given location. As long as they have the workbook in the Weekly Forecasts folder I am providing them with it should not matter where they place it. Doon't want the coding to depend on that. Carlos Rodriguez
-
I am just getting started with VBA for Excel and don't knwo the code to get to do the following: 1. Saving a Workbook I am creating with the following format ddmmmyyyy & _Weekly_Forecast.xls in a folder named "Weekly Reports" right under the folder where the master workbook is. The file being saved is generated from a copy/paste of two sheets of the master workbook that is found in the current directory. 2. How to change directory without the need of typing the entire path. Does anything like "~" exist? The problem being I don't want to force users to save the workbook on a given location. As long as they have the workbook in the Weekly Forecasts folder I am providing them with it should not matter where they place it. Doon't want the coding to depend on that. Carlos Rodriguez
I don't have an answer, but you may get one on a different site. Try Access-Programmers. Of course, they deal with Access issues, but they also write in VBA. Just a thought.
-
I am just getting started with VBA for Excel and don't knwo the code to get to do the following: 1. Saving a Workbook I am creating with the following format ddmmmyyyy & _Weekly_Forecast.xls in a folder named "Weekly Reports" right under the folder where the master workbook is. The file being saved is generated from a copy/paste of two sheets of the master workbook that is found in the current directory. 2. How to change directory without the need of typing the entire path. Does anything like "~" exist? The problem being I don't want to force users to save the workbook on a given location. As long as they have the workbook in the Weekly Forecasts folder I am providing them with it should not matter where they place it. Doon't want the coding to depend on that. Carlos Rodriguez
Hi, I submitted my first n only one article abt Excel need n using in VB.Net. Use my article which may help u.... The article is http://www.codeproject.com/useritems/Senthil\_S\_\_Software\_Eng\_.asp And anything pls reply r inform to me... Pls..
Senthil S Software Engineer