Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm trying to learn VBA and I need some help with this: The code below makes the sheets 4 and more to be selected up to the last sheet in the workbook. Can anyone give me help to create a code that select sheet 4 to 9 in a workbook with more than 9 sheets. I mean, how to get that array in the workbook? Dim sheetArray() As Integer Dim firstSheet As Integer, sheetCount As Integer, x As Integer firstSheet = 4 sheetCount = ThisWorkbook.WorkSheets.Count - firstSheet ReDim sheetArray(sheetCount) For x = 0 To sheetCount sheetArray(x) = firstSheet + x Next x ThisWorkbook.WorkSheets(sheetArray).Select Thanks in advance! //Thomas |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Getting a Sheet to Choose to Display Other Sheets | Excel Discussion (Misc queries) | |||
Switching between sheets in same workbook (Like Alt + Tab & Choose | Excel Discussion (Misc queries) | |||
choose. | Excel Discussion (Misc queries) | |||
choose? | Excel Discussion (Misc queries) | |||
Choose. | New Users to Excel |