VBA - Add sheets to variable and move to new workbook
问题 I am trying to write a macro which can create up to 3 new worksheets, and at the end will move those sheets to a new workbook. Some, all or none of those sheets may be created, and I am struggling to move them all. I have tried adding their names to both a string and an array (with and without quotes to mimic if I manually typed the names of the sheets to move). This is what I have at the moment, but it is returning Run-Time error '9': Subscript out of range. If I only move one of the sheets