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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top