Sub MakeBtnOnFormTtable ' Creates the buttons on the form Ttable
MakeButtonArray ("FormTtable", "btnTt", "ClickTtableBtn", txtFontSize.Text , txtStartPt.Text _
, txtNoOfCols.Text , txtHeight.Text , StudentNumber)
End Sub
Sub MakeButtonArray (frmName, btnName, btnClickSubName, btnFontSize, StartRow, btnNoOfCols, btnHeight, btnTotalNo)
'' FUNCTIONS - Makes buttons via programming
btnWidth = Int( 240/btnNoOfCols)
Ccol = 0
Rrow = StartRow
For btnNo = 1 To btnTotalNo
AddButton (frmName, btnName&btnNo, Ccol, Rrow, btnWidth, btnHeight, btnNo)
Button(btnName&btnNo).fontsize = btnFontSize
AddEvent(btnName&btnNo,click,btnClickSubName)
Ccol = Ccol + btnWidth
If Ccol >= 240 Then
Ccol = 0
Rrow = Rrow + btnHeight
End If
Next
End Sub