VBA Code to Generate Report
VBA Code to Generate Report
.Name = ReportSheet
.Rows(1).RowHeight = 20
End With
.Name = StudentNames
End With
End Sub
'==========================================
'
Sub main()
Application.ScreenUpdating = False
Dim i As Long
With Sheets(StudentNames)
DoOval i
Sheets(ReportSheet).[B][COLOR=#0000cd]PrintOut[/COLOR][/B]
Next i
End With
Application.ScreenUpdating = True
End Sub
Sub DoOval(irow)
Dim grades
grades = Array("A", "B", "C", "D", "D-", "E", "Inc.") ' array of possible grades
Dim g, ag
Sheets(ReportSheet).Activate
ClearReport
Cells(1, g + 1) = grades(g)
Cells(2, 1) = Sheets(StudentNames).Cells(irow, 1)
Next g
ag = 1
End If
End With
With Selection
.Name = "GradeOval"
.ShapeRange.Fill.Visible = msoFalse
.ShapeRange.Line.ForeColor.SchemeColor = 12
.ShapeRange.Line.Weight = 2
End With
Cells(2, 1).Activate
End Sub
Sub ClearReport()
End Sub