Maybe this isn't possible to match name and copy?
Okay, I think I am in business .. .it is working .. that was quite a workout
for you. Thank you for your time. Appreciate all you have contributed!
"Greg Wilson" wrote in message
...
Annette,
The "ThisWorkbook" statement references the workbook from
which the code is running; i.e. the Personal.xls workbook
in your case. Unless you changed it, it has only one
worksheet. Therefore, the statement:
"ShtCount = ThisWorkbook.Sheets.Count" sets the ShtCount
variable to 1. Therefore, the statement "For i = 2 To
ShtCount" won't do anything.
To fix it just change:
ShtCount = ThisWorkbook.Sheets.Count
To:
ShtCount = ActiveWorkbook.Sheets.Count
Works for me.
Regards,
Greg
-----Original Message-----
I just got it work .. I moved the code from my
personal.xls to the text.xls
spreadsheet so it was running inside the spreadsheet and
it runs just
perfect! I had the code written into my personal.xls
so that I could
access from any worksheet, instead of the test
spreadsheet. How would I
change it so it would work from any personal.xls?
As I had indicated earlier this was going to be tagged on
to another bit of
code that creates a workbook from another program.
This code is better than expected also. After I figure
out what was wrong,
I was wowed!
|