run macro on Protectied sheet
Sure.
But some of the features you try to use may not be available on a protected
worksheet.
A typical solution is to unprotect the worksheet, run the real code and the
reprotect the worksheet.
Option Explicit
Sub Testme01()
dim myPWD as string
myPWD = "top secret"
worksheets("sheet9999").unprotect password:=mypwd
'do the real work
worksheets("sheet9999").protect password:=mypwd
end sub
Tufail wrote:
hello,
can we run a macro on proteicted sheet if so how ?
thanks in advance.
--
Dave Peterson
|