TonemanABC
New Member
- Joined
- Apr 11, 2024
- Messages
- 1
- Office Version
- 2021
- Platform
- Windows
Very new to VBA so excuse my ignorance. Trying to design a simple spreadsheet using forms to enter data on separate spreadsheets. I only want the 'Menu' spreadsheet to display when opening the workbook. I also have code linked to the buttons on my menu spreadsheet to open the pages.
I am using the code
However whilst this works fine - it seems to be set to a loop? And none of my other buttons seem to be working.
Is there better code to do this?
I am using the code
VBA Code:
Private Sub Workbook_Open()
Dim b As Worksheet
For Each b In Worksheets
If b.Name <> "Menu" Then b.Visible = False
Next b
End Sub
However whilst this works fine - it seems to be set to a loop? And none of my other buttons seem to be working.
Is there better code to do this?