Sub HideCombo()
Dim ws As Worksheet
Set ws = Worksheets("Sheets1") 'Change name to suit you.
With ws.DropDowns("Drop Down 1") 'Change name to suit you.
.Visible = False
End With
End Sub
Sub ShowCombo()
Dim ws As Worksheet
Set ws = Worksheets(1)
With ws.DropDowns(("Drop Down 1")
.Visible = True
End With
End Sub
You can run the following subs to get the name or index property of a particular dropdown.
[Code]Sub GetDropDownName()
Dim ws As Worksheet
Set ws = Worksheets(1)
MsgBox ws.DropDowns(1).Name
Sub GetDropDownIndexNumber()
Dim ws As Worksheet
Set ws = Worksheets(1)
MsgBox ws.DropDowns("Drop Down 1").Index
End Sub
Sub HideCombo()
Dim ws As Worksheet
Set ws = Worksheets("Sheets1") 'Change name to suit you.
With ws.DropDowns("Drop Down 1") 'Change name to suit you.
.Visible = False
End With
End Sub
Sub ShowCombo()
Dim ws As Worksheet
Set ws = Worksheets(1)
With ws.DropDowns(("Drop Down 1")
.Visible = True
End With
End Sub
Sub GetDropDownName()
Dim ws As Worksheet
Set ws = Worksheets(1)
MsgBox ws.DropDowns(1).Name
End Sub
Sub GetDropDownIndexNumber()
Dim ws As Worksheet
Set ws = Worksheets(1)
MsgBox ws.DropDowns("Drop Down 1").Index
End Sub
Sub comments1() Rows("179:185").Hidden = Not Rows("179:185").Hidden
End Sub
Sub comments1()
With Worksheets(1)
With .Rows("179:185")
.Hidden = Not .Hidden
End With
With .DropDowns("Drop Down 1")
.Visible = Not .Visible
End With
End With
End Sub