-
Notifications
You must be signed in to change notification settings - Fork 1
/
SearchAndSort.XLSB
47 lines (39 loc) · 1.84 KB
/
SearchAndSort.XLSB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Sub SearchAndSort()
'
' Le Macron
'
Dim actSheet As Worksheet
Dim upper, lower As Integer
Dim tempString As String
Dim selectedArea As Range
Dim element As Variant
Dim sLines(1 To 19) As String
sLines(1) = "Authorized Stored Procedures and Functions:"
sLines(2) = "Authorized Permissions for Listed Folder: C:\awesome\"
sLines(3) = "Authorized Permissions for Listed Folder: E:\backup\"
sLines(4) = "Authorized Permissions for Listed Folder: E:\Popnlock"
sLines(5) = "Authorized Permissions for Listed Folder: E:\johnsnow"
sLines(6) = "Authorized Permissions for Listed Folder: E:\nedstark"
sLines(7) = "Authorized Permissions for Listed Folder: e:\tothekingintheNorth\"
sLines(8) = "Authorized Permissions for Listed Folder: e:\ivegottasoftspotforcripplesbastardsandbrokenthings\)"
sLines(9) = "Authorized Permissions for Listed Folder: e:\MSSQL\Binn)"
sLines(11) = "Login and Permissions are authorized:"
sLines(12) = "Authorized user-defined roles:"
sLines(13) = "Direct user assignments to server permissions and user-defined server roles"
sLines(14) = "Authorized Logins And Permissions"
sLines(15) = "Authorized stored procedures and jobs"
sLines(16) = "SQL Server Account Authorized to own database objects"
sLines(17) = "Server Authentication Mode"
sLines(19) = "Optional features SQL Server Integrated Services (SSIS):"
sLines(18) = "Organizational defined numer of sessions"
Set actSheet = Application.Worksheets("APPENDIX B")
Set selectedArea = Selection
For Each element In sLines
Cells.Find(What:=element, After:= _
ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).CurrentRegion.Select
Set selectedArea = Selection
selectedArea.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlYes
Next element
End Sub