Hey Guys,
I'm running macros off a checkbox that hides a certain number of rows, but when the rows are being shown again, all the drop down boxes are bunched at the top of the range.
Here's my VBA code so you can understand what's going on.
Sub CheckBox1696_Click()
Dim mode As Boolean
mode = Sheets("Cap Gr").ProtectContents
If Range("P67") = True Then
Range("C82") = 6 'pre mf 1
Range("C88") = 6 'super 1
Range("I82") = 6 'pre mf 2
Range("E82") = 6 'post mf 1
Range("C96") = 6 'ap 1
Range("I88") = 6 'super 2
Range("I96") = 6 'ap 2
Range("K82") = 6 'mf 2
Rows("48:69").Hidden = False
ActiveSheet.Shapes("drop down 1748").Visible = True
ActiveSheet.Shapes("drop down 1751").Visible = True
ActiveSheet.Shapes("drop down 1749").Visible = True
ActiveSheet.Shapes("drop down 1746").Visible = True
ActiveSheet.Shapes("drop down 1753").Visible = True
ActiveSheet.Shapes("drop down 1755").Visible = True
ActiveSheet.Shapes("drop down 1756").Visible = True
ActiveSheet.Shapes("drop down 1773").Visible = True
ActiveSheet.Shapes("drop down 1780").Visible = True
ActiveSheet.Shapes("drop down 1781").Visible = True
ActiveSheet.Shapes("drop down 1797").Visible = True
ActiveSheet.Shapes("drop down 1798").Visible = True
ActiveSheet.Shapes("drop down 1799").Visible = True
ActiveSheet.Shapes("drop down 1800").Visible = True
ActiveSheet.Shapes("drop down 1801").Visible = True
ActiveSheet.Shapes("drop down 1802").Visible = True
ActiveSheet.Shapes("drop down 1803").Visible = True
ActiveSheet.Shapes("drop down 1804").Visible = True
ActiveSheet.Shapes("drop down 1805").Visible = True
ActiveSheet.Shapes("drop down 1806").Visible = True
Else
Range("C82") = 4 'pre mf 1
Range("C88") = 4 'super 1
Range("I82") = 4 'pre mf 2
Range("E82") = 3 'post mf 1
Range("C96") = 3 'ap 1
Range("I88") = 4 'super 2
Range("I96") = 3 'ap 2
Range("K82") = 3 'mf 2
Rows("48:69").Hidden = True
ActiveSheet.Shapes("drop down 1748").Visible = False
ActiveSheet.Shapes("drop down 1751").Visible = False
ActiveSheet.Shapes("drop down 1749").Visible = False
ActiveSheet.Shapes("drop down 1746").Visible = False
ActiveSheet.Shapes("drop down 1753").Visible = False
ActiveSheet.Shapes("drop down 1755").Visible = False
ActiveSheet.Shapes("drop down 1756").Visible = False
ActiveSheet.Shapes("drop down 1773").Visible = False
ActiveSheet.Shapes("drop down 1780").Visible = False
ActiveSheet.Shapes("drop down 1781").Visible = False
ActiveSheet.Shapes("drop down 1797").Visible = False
ActiveSheet.Shapes("drop down 1798").Visible = False
ActiveSheet.Shapes("drop down 1799").Visible = False
ActiveSheet.Shapes("drop down 1800").Visible = False
ActiveSheet.Shapes("drop down 1801").Visible = False
ActiveSheet.Shapes("drop down 1802").Visible = False
ActiveSheet.Shapes("drop down 1803").Visible = False
ActiveSheet.Shapes("drop down 1804").Visible = False
ActiveSheet.Shapes("drop down 1805").Visible = False
ActiveSheet.Shapes("drop down 1806").Visible = False
End If
' Range("D25").Select
' Sheets("Cap Gr").
End Sub
Cheers for the help
I'm running macros off a checkbox that hides a certain number of rows, but when the rows are being shown again, all the drop down boxes are bunched at the top of the range.
Here's my VBA code so you can understand what's going on.
Sub CheckBox1696_Click()
Dim mode As Boolean
mode = Sheets("Cap Gr").ProtectContents
If Range("P67") = True Then
Range("C82") = 6 'pre mf 1
Range("C88") = 6 'super 1
Range("I82") = 6 'pre mf 2
Range("E82") = 6 'post mf 1
Range("C96") = 6 'ap 1
Range("I88") = 6 'super 2
Range("I96") = 6 'ap 2
Range("K82") = 6 'mf 2
Rows("48:69").Hidden = False
ActiveSheet.Shapes("drop down 1748").Visible = True
ActiveSheet.Shapes("drop down 1751").Visible = True
ActiveSheet.Shapes("drop down 1749").Visible = True
ActiveSheet.Shapes("drop down 1746").Visible = True
ActiveSheet.Shapes("drop down 1753").Visible = True
ActiveSheet.Shapes("drop down 1755").Visible = True
ActiveSheet.Shapes("drop down 1756").Visible = True
ActiveSheet.Shapes("drop down 1773").Visible = True
ActiveSheet.Shapes("drop down 1780").Visible = True
ActiveSheet.Shapes("drop down 1781").Visible = True
ActiveSheet.Shapes("drop down 1797").Visible = True
ActiveSheet.Shapes("drop down 1798").Visible = True
ActiveSheet.Shapes("drop down 1799").Visible = True
ActiveSheet.Shapes("drop down 1800").Visible = True
ActiveSheet.Shapes("drop down 1801").Visible = True
ActiveSheet.Shapes("drop down 1802").Visible = True
ActiveSheet.Shapes("drop down 1803").Visible = True
ActiveSheet.Shapes("drop down 1804").Visible = True
ActiveSheet.Shapes("drop down 1805").Visible = True
ActiveSheet.Shapes("drop down 1806").Visible = True
Else
Range("C82") = 4 'pre mf 1
Range("C88") = 4 'super 1
Range("I82") = 4 'pre mf 2
Range("E82") = 3 'post mf 1
Range("C96") = 3 'ap 1
Range("I88") = 4 'super 2
Range("I96") = 3 'ap 2
Range("K82") = 3 'mf 2
Rows("48:69").Hidden = True
ActiveSheet.Shapes("drop down 1748").Visible = False
ActiveSheet.Shapes("drop down 1751").Visible = False
ActiveSheet.Shapes("drop down 1749").Visible = False
ActiveSheet.Shapes("drop down 1746").Visible = False
ActiveSheet.Shapes("drop down 1753").Visible = False
ActiveSheet.Shapes("drop down 1755").Visible = False
ActiveSheet.Shapes("drop down 1756").Visible = False
ActiveSheet.Shapes("drop down 1773").Visible = False
ActiveSheet.Shapes("drop down 1780").Visible = False
ActiveSheet.Shapes("drop down 1781").Visible = False
ActiveSheet.Shapes("drop down 1797").Visible = False
ActiveSheet.Shapes("drop down 1798").Visible = False
ActiveSheet.Shapes("drop down 1799").Visible = False
ActiveSheet.Shapes("drop down 1800").Visible = False
ActiveSheet.Shapes("drop down 1801").Visible = False
ActiveSheet.Shapes("drop down 1802").Visible = False
ActiveSheet.Shapes("drop down 1803").Visible = False
ActiveSheet.Shapes("drop down 1804").Visible = False
ActiveSheet.Shapes("drop down 1805").Visible = False
ActiveSheet.Shapes("drop down 1806").Visible = False
End If
' Range("D25").Select
' Sheets("Cap Gr").
End Sub
Cheers for the help