Hi Experts.
Note: I tried below in reddit, I recently joined but it's been 12 hours, my question does not even show up. So come back here in trust.
Problem statement: Sharepoint Excel which is password protected has a bug, users can clear off the filters, but they cannot set it back as it requires password.
What I have done till now:
What I did was to create a simple macro, but to deploy in Sharepoint, saved as add-ins (.xlam) but, I want users to easily click with hidden code, as it is password protected.
I could only see macros can be associated with icon and can be added in Ribbon but add-ins, I googled but I am bit confused, as most of the material is to create a new ribbon with XML.
Please can you help me.
Here is the basic code, I have written
Please can you help me how to create one click solution to make it easy for end users, while protecting the password of the spread sheet.
Note: I tried below in reddit, I recently joined but it's been 12 hours, my question does not even show up. So come back here in trust.
Problem statement: Sharepoint Excel which is password protected has a bug, users can clear off the filters, but they cannot set it back as it requires password.
What I have done till now:
What I did was to create a simple macro, but to deploy in Sharepoint, saved as add-ins (.xlam) but, I want users to easily click with hidden code, as it is password protected.
I could only see macros can be associated with icon and can be added in Ribbon but add-ins, I googled but I am bit confused, as most of the material is to create a new ribbon with XML.
Please can you help me.
Here is the basic code, I have written
VBA Code:
Option Explicit
Sub SecurefileFilteron()
Call UnProtectPassword
Call RPFilterONOFF
Call ProtectPassword
End Sub
Public Sub ProtectPassword()
ActiveSheet.Protect Password:="test123", AllowFiltering:=True
End Sub
Public Sub UnProtectPassword()
ActiveSheet.Unprotect Password:="test123"
End Sub
Public Sub RPFilterONOFF()
Rows("4:4").AutoFilter
' Rows("4:4").Select.AutoFilter
'' Selection.AutoFilter
End Sub
Please can you help me how to create one click solution to make it easy for end users, while protecting the password of the spread sheet.