worksheet protection/macro

W

wally

Hi,
I have windows xp, home edition. After protecting a worksheet, which
contains formulas, I would like to run a macro to copy and paste the
text only of the the worksheet to another worksheet. I can do this now
before the worksheet is protected but I would like to run the macro
without unptotecting the worksheet.
Thanks--Wally Brockway
 
P

Peo Sjoblom

You have to unprotect the worksheet in the macro, do your thing and then
protect it again A simple example



Application.ScreenUpdating = False

ActiveSheet.Unprotect Password:="abcd"

'Your code here

ActiveSheet.Protect Password:="abcd"

Application.ScreenUpdating = True


End Sub
 

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