A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

worksheet protection/macro



 
 
Thread Tools Display Modes
  #1  
Old September 16th, 2003, 02:44 PM
wally
external usenet poster
 
Posts: n/a
Default 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  
Old September 16th, 2003, 02:54 PM
Paul B
external usenet poster
 
Posts: n/a
Default 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  
Old September 16th, 2003, 03:15 PM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default 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  
Old September 16th, 2003, 09:50 PM
wally
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.