View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jetty Jetty is offline
external usenet poster
 
Posts: 1
Default Visual basic unlock "SORT" function in an EXCEL spreadsheet

How do I add a string to enable the "SORT" function in the following
workbook?

My current string in the spreadsheet is as follows:

Private Sub Workbook_Open()

Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets(Array("Key Controls", "NonKey
Controls"))
With ws
.Protect Password:="sox2005", DrawingObjects:=True, _
contents:=True, Scenarios:=True, _
userinterfaceonly:=True
.EnableAutoFilter = True
.EnableOutlining = True
End With
Next ws
End Sub