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: 24
Default Protect - Unprotect code location


I have the following code that works except for the ActiveSheet.Unprotect and
ActiveSheet.Protect (no password to be used), I suspect that I do not have it
in the proper arrangement / location. Can someone help?

Option Explicit
Sub RANKING_SORT()
ActiveSheet.Unprotect
Dim source As Range
With ActiveSheet
Set source = .Range(.Range("A11"), .Range("AR11").End(xlDown))
End With
source.Sort source.Range("V11"), xlAscending
ActiveSheet.Protect
End Sub
 
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
Protect/UnProtect Project (code) via VBA? brucemc[_24_] Excel Programming 1 July 5th 06 05:21 AM
Generic protect/unprotect code through buttons and code? StargateFanFromWork[_3_] Excel Programming 4 December 31st 05 12:10 AM
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 07:14 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"