LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Generic protect/unprotect code through buttons and code?

I looked through the archives but have seen that there can be problems with
protecting/unprotecting sheets with vb so thought I would just ask about
this one. I have buttons on some of my sheets. I'm ready to protect the
sheets whereas up till now they remained unprotected. Apparently, we can
unprotect sheet, run code, then protect sheet again. (I'm assuming buttons
will still be clickable even though protected??)

Also, we'll need a generic line of coding for protecting/unprotecting -
i.e., without any sheet names and/or passwords - as that would be easiest to
deal with as then I could simply copy those lines to all the current
workbooks. It would mean adding a simple unprotect line after title of
script and have code then execute rest of script - such as sort, etc. - and
then protect the sheet before script finishes.

Also, people have posted about problems with passwords so we won't need any
passwords. And the other problem I saw is that code might not work if sheet
protected manually, etc. So it was recommended in that particular post to
use an IF statement. I haven't been able to find an example of code that
will do these 2 things so begging indulgence of group to help with this one.

This is final step in completing all the workbooks I made here at this job 1
1/2 yrs ago. They've been unprotected all this time. Hopefully I can close
them up yet still retain full functionality with all the buttons/code! <g

Thank you!! :oD


 
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
Code to protect/unprotect a sheet using a macro with password FredH Excel Discussion (Misc queries) 5 October 23rd 07 04:49 PM
Unprotect Code Module in Code Damien Excel Discussion (Misc queries) 2 April 18th 06 03:10 PM
Please help!!! Using code to password-protect and unprotect... Hawk Excel Programming 6 July 9th 05 10:48 PM
VBA code - protect and unprotect a sheet Jeff Excel Programming 2 December 2nd 03 11:44 PM


All times are GMT +1. The time now is 09:20 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"