Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to get a macro to work on another worksheet


RJQMAN,

Put something like this for active sheet at the top of your code:
ActiveSheet.unprotect

Put this at the bottom:
ActiveSheet.protect

If you want a password usesomething like:
ActiveSheet.Unprotect Password:="mypassword"

and:
ActiveSheet.Protect Password:="mypassword"

Something like this will specify certain sheets:
ThisWorkbook.Worksheets("Sheet1).Unprotect("mypass word")
ThisWorkbook.Worksheets("Sheet1).Protect("mypasswo rd")

Dave
Wrote:
Everything you have suggested works! I do not yet understand why mine
did not, but thank you for solving my problem. I am an old dude that
used to program in Fortran - it seemed easy compared to trying to
learn
this. I guess it is partially true - it is hard to teach an old dog
new tricks.

I have another question, which I should probably post as a different
one. Can I have a macro Unprotect a protected sheet and then
re-protect it after the changes have been made? I will repost if I do
not get a response.

Many thanks for your help. I know I will have more questions, and the
help on this newsgroup is extraordinary.



--
Piranha
------------------------------------------------------------------------
Piranha's Profile:
http://www.excelforum.com/member.php...o&userid=20435
View this thread: http://www.excelforum.com/showthread...hreadid=388589

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Link one worksheet in a workbook to another worksheet in same work bjswise Excel Discussion (Misc queries) 1 February 6th 10 12:09 AM
Macro to update a column in a work based on another work sheet WickerMan New Users to Excel 1 December 4th 09 12:58 PM
How do I make a macro work in one worksheet only Hawkfan757 Excel Programming 1 January 11th 05 05:43 PM
Get Macro on one Worksheet to Work on Others Tom Dunlap Excel Programming 1 June 26th 04 08:43 PM
having a macro work only on a worksheet dennc01 Excel Programming 3 April 6th 04 11:05 PM


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"