Hello,
I have a Navigation tab in a workbook that has buttons to take you to specific sheets.
I have written code so that when the "Plastics" option button is selected columns I:Q are hidden and all buttons within those rows are hidden.
All other of the Option buttons have similar code. They collapse columns and hide buttons in those specific rows. Leaving one color set of buttons "unhidden" and the two sets of Gray buttons "unhidden".
All of the hiding and unhiding of columns and buttons works.
But all of a sudden the only CommandButtons that are working are the:
- Gray Command Buttons
-Pink "Gen Design Requirements" & "Material Requirements" CommandButtons.
If I click the other buttons a button appears under "educational" as you can see from the image.
When I reopen the file all of the colored buttons appear in that "educational" column stacked on top of each other.
Please let me know if you have any theories to help. I appreciate any efforts!
I have a Navigation tab in a workbook that has buttons to take you to specific sheets.
I have written code so that when the "Plastics" option button is selected columns I:Q are hidden and all buttons within those rows are hidden.
VBA Code:
Private Sub OptionButton2_Click() '''''''Plastics
ActiveSheet.Shapes("CommandButton1").Visible = True
ActiveSheet.Shapes("CommandButton2").Visible = True
ActiveSheet.Shapes("CommandButton3").Visible = True
ActiveSheet.Shapes("CommandButton4").Visible = True
ActiveSheet.Shapes("CommandButton5").Visible = True
ActiveSheet.Shapes("CommandButton6").Visible = True
ActiveSheet.Shapes("CommandButton7").Visible = True
ActiveSheet.Shapes("CommandButton8").Visible = True
ActiveSheet.Shapes("CommandButton9").Visible = True
ActiveSheet.Shapes("CommandButton10").Visible = True
ActiveSheet.Shapes("CommandButton11").Visible = True
ActiveSheet.Shapes("CommandButton12").Visible = False
ActiveSheet.Shapes("CommandButton13").Visible = False
ActiveSheet.Shapes("CommandButton14").Visible = False
ActiveSheet.Shapes("CommandButton15").Visible = False
ActiveSheet.Shapes("CommandButton16").Visible = False
ActiveSheet.Shapes("CommandButton18").Visible = False
ActiveSheet.Shapes("CommandButton19").Visible = False
ActiveSheet.Shapes("CommandButton20").Visible = False
ActiveSheet.Shapes("CommandButton21").Visible = False
ActiveSheet.Shapes("CommandButton22").Visible = False
ActiveSheet.Shapes("CommandButton17").Visible = False
ActiveSheet.Shapes("CommandButton23").Visible = False
ActiveSheet.Shapes("CommandButton24").Visible = False
ActiveSheet.Shapes("CommandButton25").Visible = False
ActiveSheet.Shapes("CommandButton26").Visible = False
ActiveSheet.Shapes("CommandButton32").Visible = False
ActiveSheet.Shapes("CommandButton27").Visible = False
ActiveSheet.Shapes("CommandButton28").Visible = False
ActiveSheet.Shapes("CommandButton29").Visible = False
ActiveSheet.Shapes("CommandButton30").Visible = False
ActiveSheet.Shapes("CommandButton31").Visible = False
ActiveSheet.Shapes("CommandButton32").Visible = False
ActiveSheet.Shapes("CommandButton33").Visible = False
ActiveSheet.Shapes("CommandButton34").Visible = False
ActiveSheet.Shapes("CommandButton35").Visible = False
ActiveSheet.Shapes("CommandButton36").Visible = False
ActiveSheet.Shapes("CommandButton37").Visible = False
ActiveSheet.Shapes("CommandButton38").Visible = False
ActiveSheet.Shapes("CommandButton39").Visible = False
ActiveSheet.Shapes("CommandButton40").Visible = False
ActiveSheet.Shapes("CommandButton42").Visible = False
ActiveSheet.Shapes("CommandButton43").Visible = False
ActiveSheet.Shapes("CommandButton44").Visible = False
ActiveSheet.Shapes("CommandButton45").Visible = False
ActiveSheet.Shapes("CommandButton46").Visible = False
ActiveSheet.Shapes("CommandButton47").Visible = False
Columns("I:Q").Hidden = True
Columns("F:H").Hidden = False
ActiveSheet.Shapes("Group Box 110").Visible = False
End Sub
All other of the Option buttons have similar code. They collapse columns and hide buttons in those specific rows. Leaving one color set of buttons "unhidden" and the two sets of Gray buttons "unhidden".
All of the hiding and unhiding of columns and buttons works.
But all of a sudden the only CommandButtons that are working are the:
- Gray Command Buttons
-Pink "Gen Design Requirements" & "Material Requirements" CommandButtons.
If I click the other buttons a button appears under "educational" as you can see from the image.
When I reopen the file all of the colored buttons appear in that "educational" column stacked on top of each other.
Please let me know if you have any theories to help. I appreciate any efforts!