Macro Script

B

Brandon

I know how to record a macro . . . but how would I convert the following
Script into an Excel macro?

Option Explicit
Sub testme()
Dim wks As Worksheet
Dim myPWD As String

myPWD = "hi"
For Each wks In ActiveWorkbook.Worksheets
wks.Protect Password:=myPWD
Next wks
End Sub
 
B

Brandon

thanks, but I don't see anything there that helps me understand what to do
with the script below.
 
Top