Hello guys, I need help with the below VBA, I need to have the same code that I will put on the Excel for the web (SharePoint Site) Hope someone could able to help me.
Sub Workbook_Open()
Dim wks As Worksheet
ActiveSheet.Unprotect Password:="QA"
For Each wks In Worksheets
If wks.FilterMode = True Then
wks.ShowAllData
End If
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Next wks
End Sub
Sub Workbook_Open()
Dim wks As Worksheet
ActiveSheet.Unprotect Password:="QA"
For Each wks In Worksheets
If wks.FilterMode = True Then
wks.ShowAllData
End If
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingColumns:=True, AllowInsertingRows _
:=True, AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True
Next wks
End Sub