in reply to Scope of workbook in write excel
Note: this appears to be a near duplicate (other than formatting and a couple of minor revisions of the code) of Not able to create worksheets inside a subroutine.
--MidLifeXis