Databases Reference
In-Depth Information
'Perform Horizontal Sort on row across specified columns
Selection.Sort Key1:=Range(Cells(row, startcol), Cells(row,
startcol)), Order1:=Order, header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlLeftToRight
End Sub
The last objective upon changing views was to add the standardized comments to the last
column in the report. Table 6.3 shows the comments that the instructor desires to have available
within the report. What is needed is a mechanism to allow these comments to be added to a range
of cells so that they can be selected by means of a drop-down box.
Sub CommentDropDn(rng As Range)
'Adds Drop Down List of Standard Comments
Dim Cmt(10) As String, ii As Integer, CmtList$
'Assign up to 10 specific Comments to Array Here
Cmt(1) = "Perfect Attendance"
Cmt(2) = "Poor Attitude"
Cmt(3) = "Poor Attendance"
Cmt(4) = "Active Participant"
Cmt(5) = "Presented for Group"
For ii = 1 To UBound(Cmt())
If ii < UBound(Cmt()) Then
CmtList$ = CmtList$ & Cmt(ii) & Chr(44)
Else
CmtList$ = CmtList$ & Cmt(ii)
End If
Next ii
rng.Select
'Range(rng$).Select
Selection.HorizontalAlignment = xlLeft
With Selection.Validation
.Delete
TABLE 6.3
Desired Comments for Report
Index
Comment Text
1
“Perfect Attendance”
2
“Poor Attitude”
3
“Poor Attendance”
4
“Active Participant”
5
“Presented for Group”
 
Search WWH ::




Custom Search