Instead of going through the windows collection, you could do:
Thisworkbook.activate
If you have multiple windows into the same workbook, then this kind of thing:
windows(thisworkbook.name).activate
will fail.
> How can I change the statement below to use the name of the workbook running
> the macro rather than the hardcoded workbook name in that statement?
[quoted text clipped - 6 lines]
> change. I know nothing about VB or writing macros. I generally record macros
> and than make small changes to fine tune them to my needs.

Signature
Dave Peterson
Don - 27 Jul 2007 18:04 GMT
Thank you.
> Instead of going through the windows collection, you could do:
>
[quoted text clipped - 19 lines]
>> macros
>> and than make small changes to fine tune them to my needs.