Macro Script

  • Thread starter Thread starter Brandon
  • Start date Start date
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
 
thanks, but I don't see anything there that helps me understand what to do
with the script below.
 
Back
Top