Hello,
I currently have a sheet with macros enabled where I have used VBA to code a button to alphabetize my information by clicking it. I want to protect the information on the sheet from others changing it, but I want others to be able to still click the button while everything else is locked. Every time I lock the sheet it will not let me click the button without unlocking it first. I do not want to share the passcode with the other people who will see this.
Here is what I have so far:
Sub Button1_Click()
Dim oneRng As Range
Dim aCol As Range
Set oneRng = Range("A3:A700")
Set aCol = Range("A3")
oneRng.Sort Key1:=aCol, Order1:=xlAscending, Header:=xlYes
'oneRng.Sort Key1:=aCol, Order1:=xlDescending, Header:=xlYes
End Sub
I currently have a sheet with macros enabled where I have used VBA to code a button to alphabetize my information by clicking it. I want to protect the information on the sheet from others changing it, but I want others to be able to still click the button while everything else is locked. Every time I lock the sheet it will not let me click the button without unlocking it first. I do not want to share the passcode with the other people who will see this.
Here is what I have so far:
Sub Button1_Click()
Dim oneRng As Range
Dim aCol As Range
Set oneRng = Range("A3:A700")
Set aCol = Range("A3")
oneRng.Sort Key1:=aCol, Order1:=xlAscending, Header:=xlYes
'oneRng.Sort Key1:=aCol, Order1:=xlDescending, Header:=xlYes
End Sub