I have this piece of code here.
Const pw As String = "password" '<-change password here ActiveSheet.Unprotect pw Range("B7").QueryTable.Refresh BackgroundQuery:=False ActiveSheet.Protect pw
It unprotects refreshes data and reprotects. Currently it run a button on the active sheet. I want the button to do the same thing for two different sheets. Can anyone help me with this?