Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Spreadsheet info within a frame

Status
Not open for further replies.

longshot3001

Programmer
Apr 17, 2002
3
AU
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top