I am a beginner in VBA and am currently having issues figuring this code out. Can anyone point me in the right direction? I have a load button on a master list and if the item has a quantity in column 3, it will automatically be unhidden in the next sheet with that quantity in it and then hide any other items that do not have a quantity. Am I doing this correctly?
Sub HideUnHide()
Dim maxWidth As Long, myWidth As Long
Dim myZoom As Single
If Application.Caller = "LoadButton" Then
If Worksheets("Pull_Sheet").Visible = xlSheetVisible Then
Worksheets("Pull_Sheet").Visible = xlSheetVeryHidden
ElseIf Worksheets("Pull_Sheet").Visible = xlSheetVeryHidden Then
Worksheets("Pull_Sheet").Visible = xlSheetVisible
Worksheets("Pull_Sheet").Activate
ActiveSheet.Unprotect
Range("A2:L2").Select
ActiveSheet.Range("$A$2:$L$4272").AutoFilter Field:=3, Criteria1:=">=1"
Range("A2").Select
Worksheets("Pull_Sheet").Activate
ActiveSheet.Protect
Range("A2").Select
End If
End Sub[/CODE]
Bookmarks