May 12 2022 02:18 AM
Hi, I have an Excel Workbook Having 5(Five) No’s of Excel Sheet in named 1) DASH BOARD,2) Sheet1,3) Sheet2,4) Sheet3,5) Sheet4. In DASH BOARD Sheet there is 4(Four) No’s Button exist in named GoToSheet1, GoToSheet2, GoToSheet3, GoToSheet4, by on which pressing I go to schedule Sheet. For this I have VBA Code as below. This Excel Book looks as is usually the case with normal Excel Book.
Sub Go_To_Sheet1()
ThisWorkbook.Sheets("Sheet1").Activate
End Sub
Sub Go_To_Sheet2()
ThisWorkbook.Sheets("Sheet2").Activate
End Sub
Sub Go_To_Sheet3()
ThisWorkbook.Sheets("Sheet3").Activate
End Sub
Sub Go_To_Sheet4()
ThisWorkbook.Sheets("Sheet4").Activate
End Sub
Now I want VBA Code to hiding of 4(Four)Excel Sheet (Sheet1, Sheet2, Sheet3, Sheet4) except “DASH BOARD” Excel Sheet of this Excel Workbook. Actually when I want to open this Excel Workbook, only “DASH BOARD” Excel Sheet will be visible. When I want to perform any Excel Sheet of this Excel Workbook so that I can open the Excel Sheet by clicking same named BUTTON. After that the schedule Excel Sheet will be disappear by close (X) when task is complete, and again “DASH BOARD” Sheet will be visible only. Being new to VBA looking for VBA Code in this regards
May 12 2022 02:36 AM
SolutionSee the attached sample workbook. Code in Module1 and in ThisWorkbook.
May 14 2022 02:37 AM
May 14 2022 03:31 AM
With so many sheets, I'd do it differently. Instead of a button for each sheet, I'd use a drop-down list to select the sheet, and just one button. See the attached version.
May 16 2022 05:06 AM