Hi skumarlingam,
See the attached zip file which contains the following 3 files:
a. ExcelForumStealthProcessing.bat - Batch file which opens ExcelForumStealthProcessing.xlsm
b. ExcelForumStealthProcessing.xlsm - Excel file with macros that does what you asked for.
c. ExcelForumStealthProcessingTarget.xlsm - Simulated data file with no Macros.
The .bat file contains the Folder and File Name of the Excel Data file. You have to change the names to suit your computer. The Excel file with macros contains the Folder and File Name of the Excel Data file in cell A21. You have to change the names here also.
If this does not answer your question, please let me know what you need. A sample file with before and after is best.
The batch file contains the following code:
The Excel file with Macros contains the following code:
In the ThisWorkbook module:
In an ordinary Code module such as ModStealth:
It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
This option requires all variables to be declared and will give a compiler error for undeclared variables.
Lewis
Bookmarks