bluepenink
Well-known Member
- Joined
- Dec 21, 2010
- Messages
- 585
hello
i have the following macro in a worksheet
i recently put a passowrd to protect all sheets, and basially, this macro is to filter the data in my table by store #....but after i put a password in..its not working
in VBA, i have the following code in "this workbook"..that i thought will enable the macro to work
can someone pls help!!
i have the following macro in a worksheet
Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
With ActiveSheet
.AutoFilterMode = False
.Range("myHeaders").AutoFilter
If Range("myStoreNumber").Value <> 0 Then .Range("myHeaders").AutoFilter Field:=6, Criteria1:=Range("myStoreNumber").Value
End With
Application.ScreenUpdating = True
End Sub
i recently put a passowrd to protect all sheets, and basially, this macro is to filter the data in my table by store #....but after i put a password in..its not working
in VBA, i have the following code in "this workbook"..that i thought will enable the macro to work
Code:
Private Sub Workbook_Open()
For c = 1 To Sheets.Count
With Worksheets(c)
.Protect Password:="analyst", userinterfaceonly:=True
.EnableOutlining = True
End With
Next c
End Sub
can someone pls help!!