Results 1 to 5 of 5

End Script on worksheet that it was started in?

Threaded View

  1. #1
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    End Script on worksheet that it was started in?

    Hi Everyone,

    I have a workbook with about 52 worksheets, I have a script that will unlock the protection from all the worksheets. However the problem I'm having is the script runs and starts and ends at sheet1 I want the script to start and end at the sheet I run the script from lets say sheet 40?

    Here is what I have now.

    Any Ideas?

    Thank You for your help!!!
    Mike

    Sub unProtect()
    
    Dim Wks As Worksheet
    
        For Each Wks In Worksheets
    
            On Error Resume Next
    
            Wks.Select: Wks.Activate
    
            Wks.unProtect "Leith"
            
        Next Wks
    
    
    End Sub
    Last edited by realniceguy5000; 11-10-2008 at 11:26 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1