Hello Everyone,
Although I am new to the forum, I have search this forum and get greate help.
I have worked on a DBMS application project using Access for 5 months. I adapt Automation for my project, so my user can pull data form access to word and Excel for varies of Letters, and schedules. Recently I work on an Exam schedule, and have encountered some problems with Excel. I can pull all the data form Access and insert to Excel successfully. However, and do not know how to change the font size, weight and make border for Schedules on the fly. Can any expert give a hand?
The fallowing is a part of my Code (ODA)
Case 1
'Exam Schedule by Specified SessionYear
'need to create border for schedule and modify the font size and weight for colum heading
NoLocations = LocationArrInit(DoubleQuote(Me!DesiredSession))
With gobjExcel.Selection
Set objWS = gobjExcel.ActiveSheet
With objWS
Dim NextHeadline As Integer
For num = 1 To NoLocations
' MsgBox "Iterats Before: " & CStr(num) & " Num Of Rows: " & CStr(ColHeading)
If num > 1 Then
ColHeading = NextHeadline
End If
ColHeading = ColHeading + FillScheduleHeading(objWS, ColHeading, LocationArr(num), _
DoubleQuote(Me!DesiredSession))
'MsgBox "Mondatory Heading: " & CStr(num) & " Num Of Rows: " & CStr(ColHeading)
.Cells(ColHeading + 1, 1).Value = "Mondatory List:"
ColHeading = ColHeading + 1
ColHeading = FillScheduleBody(objWS, ColHeading, "A", LocationArr(num), _
DoubleQuote(Me!DesiredSession))
'fill data for Optional Exam Section
'MsgBox "OPtional Heading: " & CStr(num) & " Num Of Rows: " & CStr(ColHeading)
.Cells(ColHeading + 2, 1).Value = "Optional List:"
ColHeading = ColHeading + 2
ColHeading = FillScheduleBody(objWS, ColHeading, "B", LocationArr(num), _
DoubleQuote(Me!DesiredSession))
'Fill data for Rewitten and Specila Exam Section
'MsgBox "Special Heading: " & CStr(num) & " Num Of Rows: " & CStr(ColHeading)
.Cells(ColHeading + 2, 1) = "Special List:"
ColHeading = ColHeading + 2
ColHeading = FillScheduleBody(objWS, ColHeading, "C", LocationArr(num), _
DoubleQuote(Me!DesiredSession))
'Set Up the End Section of the Schedule for each exam location
ColHeading = ColHeading + 3
.Cells(ColHeading, 1) = "Total Applicants in Schedule: "
TotalApp = GetStaticApp(DoubleQuote(Me!DesiredSession), LocationArr(num))
.Cells(ColHeading, 2) = CStr(TotalApp)
NextHeadline = ColHeading + 2
' MsgBox " Iterators After: " & CStr(num) & " Num Of Rows: " & CStr(NextHeadline)
Next num
ColHeading = ColHeading + 3
.Cells(ColHeading, 1).Value = "Total Applicants in This Exam SessionYear"
.Cells(ColHeading, 2).Value = CStr(GetFinalStaticForSession(DoubleQuote(Me!DesiredSession)))
End With
End With
'Me.Visible = False
Case 2
Although I am new to the forum, I have search this forum and get greate help.
I have worked on a DBMS application project using Access for 5 months. I adapt Automation for my project, so my user can pull data form access to word and Excel for varies of Letters, and schedules. Recently I work on an Exam schedule, and have encountered some problems with Excel. I can pull all the data form Access and insert to Excel successfully. However, and do not know how to change the font size, weight and make border for Schedules on the fly. Can any expert give a hand?
The fallowing is a part of my Code (ODA)
Case 1
'Exam Schedule by Specified SessionYear
'need to create border for schedule and modify the font size and weight for colum heading
NoLocations = LocationArrInit(DoubleQuote(Me!DesiredSession))
With gobjExcel.Selection
Set objWS = gobjExcel.ActiveSheet
With objWS
Dim NextHeadline As Integer
For num = 1 To NoLocations
' MsgBox "Iterats Before: " & CStr(num) & " Num Of Rows: " & CStr(ColHeading)
If num > 1 Then
ColHeading = NextHeadline
End If
ColHeading = ColHeading + FillScheduleHeading(objWS, ColHeading, LocationArr(num), _
DoubleQuote(Me!DesiredSession))
'MsgBox "Mondatory Heading: " & CStr(num) & " Num Of Rows: " & CStr(ColHeading)
.Cells(ColHeading + 1, 1).Value = "Mondatory List:"
ColHeading = ColHeading + 1
ColHeading = FillScheduleBody(objWS, ColHeading, "A", LocationArr(num), _
DoubleQuote(Me!DesiredSession))
'fill data for Optional Exam Section
'MsgBox "OPtional Heading: " & CStr(num) & " Num Of Rows: " & CStr(ColHeading)
.Cells(ColHeading + 2, 1).Value = "Optional List:"
ColHeading = ColHeading + 2
ColHeading = FillScheduleBody(objWS, ColHeading, "B", LocationArr(num), _
DoubleQuote(Me!DesiredSession))
'Fill data for Rewitten and Specila Exam Section
'MsgBox "Special Heading: " & CStr(num) & " Num Of Rows: " & CStr(ColHeading)
.Cells(ColHeading + 2, 1) = "Special List:"
ColHeading = ColHeading + 2
ColHeading = FillScheduleBody(objWS, ColHeading, "C", LocationArr(num), _
DoubleQuote(Me!DesiredSession))
'Set Up the End Section of the Schedule for each exam location
ColHeading = ColHeading + 3
.Cells(ColHeading, 1) = "Total Applicants in Schedule: "
TotalApp = GetStaticApp(DoubleQuote(Me!DesiredSession), LocationArr(num))
.Cells(ColHeading, 2) = CStr(TotalApp)
NextHeadline = ColHeading + 2
' MsgBox " Iterators After: " & CStr(num) & " Num Of Rows: " & CStr(NextHeadline)
Next num
ColHeading = ColHeading + 3
.Cells(ColHeading, 1).Value = "Total Applicants in This Exam SessionYear"
.Cells(ColHeading, 2).Value = CStr(GetFinalStaticForSession(DoubleQuote(Me!DesiredSession)))
End With
End With
'Me.Visible = False
Case 2