Hi realrookie,
See the attached file which contains the following code. This should help you get started. Instead of -1, -2, the sequence numbers are -001,-002, etc. When viewing file names in Windows Explorer, the files sort better with the leading zeros.
In an ordinary code module such as Module1:
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.
Please let me know if you need any additional help.
Lewis
NOTE:
The attached file may not work in all situations. I recommend not downloading this file, and download the file associated with post #6 in this thread instead.
Bookmarks