If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
worksheet protection/macro
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 |
#2
|
|||
|
|||
worksheet protection/macro
Wally, you could protect the worksheet with userInterfaceOnly, this will let
your macros run, something like this Worksheets("sheet1").Protect password:="123", userInterfaceOnly:=True 'your code here Are you could unprotect it run the code and then protect it, something like this ActiveSheet.Unprotect password:="123" 'you code here ActiveSheet.Protect password:="123" -- Paul B Always backup your data before trying something new Using Excel 97 & 2000 Please post any response to the newsgroups so others can benefit from it ** remove news from my email address to reply by email ** "wally" wrote in message ... 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 |
#3
|
|||
|
|||
worksheet protection/macro
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 -- Regards, Peo Sjoblom "wally" wrote in message ... 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 |
#4
|
|||
|
|||
worksheet protection/macro
Thank you
W a b Peo Sjoblom wrote: 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 |
Thread Tools | |
Display Modes | |
|
|