FREE tutorial,solution,RSS Feeds on Operating Systems, Programming, Web Development, Applications, Databases, Networking, Hardware, Security, SEO Free Expertsforge Membership
Join us as Moderator
Submit Article to Expertsforge.com Submit Article My Expertsforge
 
RSS Feeds, Help Help RSS Feeds
bannertop
 

Excel Tutorial: Protect/Unprotect excel sheet using macro

jawahar
5/23/2007 4:56:26 PM, Views: 2746
The following tutorial shows how to protect/unprotect the excel sheet using macro

You have to pass the excel sheet name to the following functions to protect/unprotect the sheet

Code to fetch the sheet name:

ThisWorkbook.ActiveSheet.Name


Code to unprotect sheet

Public Sub Unprotect_Sheet(sname)
      Sheets(sname).Unprotect Password:="password"
End Sub


Code to protect sheet

Public Sub Protect_Sheet(sname)
      Sheets(sname).Protect Password:="password"
End Sub
Next Steps:
Add this Tutorial to:
Blink Blink del.icio.ous Del.icio.us Digg Digg
Fark Fark Furl Furl Google Google
Reddit Reddit Simpy Simpy Spurl Spurl
Technorati Technorati Windows Live Win Live Yahoo Yahoo
Rate Me!
Avg Visitor Rating: Average Visitor Rating is 4 out of 5
Number of Ratings : 3 Votes
Rate:
Send Private MessageSend Message
Signup / Login To View the Solution or Provide Comments
Post Comment/Solution
Comment:*
        (Link Rules) 
  Use : [bold] for <b>; [/bold] for </b>; [italic] for <i>; [/italic] for </i>; [code] & [/code] for code
 
Categories
Options
Excel RSS Feed
Most Popular Tutorial
Most Popular Solution
Top Rated
Top Rankers
Overall
1. jawahar (450)
Yearly -2008
1. jawahar (50)
Expertsforge Sponsors
bnrtop