Excel 2010 VBA: How to store an array of worksheets as a variable?
问题 I am trying to have several arrays of my worksheets that I can call up in my code using. ThisWorkbook.Sheets(Array("Sheet1", "Sheet3")) ThisWorkbook.Sheets(Array("Sheet2", "Sheet5")) I am wondering if there is anyway to set up a variable similar to the following: Dim ArrayOne As String Dim ArrayTwo As String ArrayOne = ThisWorkbook.Sheets(Array("Sheet1", "Sheet3")) ArrayTwo = ThisWorkbook.Sheets(Array("Sheet2", "Sheet5")) ArrayOne 'Call this Array then save Filename:="C:\Data\testfile.xls",