Macro on a protected worksheet in a shared workbook.

G

Guest

Hi,
I have a macro in protected worksheets that can't run once the Workbook is
Shared.
I have wrapped the Macro code so as the worksheet is unprotected for the
time the Macro runs, and unable the Autofilter.
The code is as follow at the moment:

Sub Newaction()

Sheets("Critical Path").Unprotect ("")
' Newaction Macro
' Macro recorded 17/11/2004 by Clifford
'

'
Selection.AutoFilter Field:=1, Criteria1:="="
Sheets("Critical Path").EnableAutoFilter = True
Sheets("Critical Path").Protect contents:=True, userInterfaceOnly:=True
Sheets("Critical Path").Protect ("")
End Sub

Can Someone assist me me ???
Thank you so much in advance.
Regards

Paul.
 

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