longshot3001
Programmer
Currently I have created a form which contains a frame. Within this frame I am needed to placed around 10 columns of information. The amount of rows may change. I know the way I am adding the data and displaying is taking up a lot of memory. I was hoping somone could tell me how I could make this code much more efficient.
Private Sub CommandButton1_Click()
Dim strStudent As String
Dim strAddress As String
Dim strSuburb As String
Dim strEmergency As String
Dim strDOB As String
Dim strGroup As String
Dim snglblheight As Single
Dim irow As Single
irow = 12
Do
strStudent = strStudent & " " & Sheets("Student Details".Range("A" & irow).Value & vbCrLf
irow = irow + 1
Loop Until Sheets("Student Details".Range("A" & irow).Value = ""
snglblheight = (irow - 11) * 11
lblStudent.Height = snglblheight
lblStudent.Caption = strStudent
End Sub
Private Sub CommandButton1_Click()
Dim strStudent As String
Dim strAddress As String
Dim strSuburb As String
Dim strEmergency As String
Dim strDOB As String
Dim strGroup As String
Dim snglblheight As Single
Dim irow As Single
irow = 12
Do
strStudent = strStudent & " " & Sheets("Student Details".Range("A" & irow).Value & vbCrLf
irow = irow + 1
Loop Until Sheets("Student Details".Range("A" & irow).Value = ""
snglblheight = (irow - 11) * 11
lblStudent.Height = snglblheight
lblStudent.Caption = strStudent
End Sub