Advertisement
Guest User

Untitled

a guest
May 11th, 2021
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. Sub ProcessCheckBox()
  2.  
  3. Dim checkBoxActive As CheckBox: Set checkBoxActive = Worksheets("Start").CheckBoxes(Application.Caller)
  4. Dim sheetName As String: sheetName = checkBoxActive.Caption
  5.  
  6. If checkBoxActive.Value = 1 Then
  7. Worksheets(sheetName).Visible = True
  8. 'Debug.Print "Now is visible."
  9. Else
  10. Worksheets(sheetName).Visible = False
  11. 'Debug.Print "visible = false"
  12. End If
  13.  
  14. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement