That code works great, Dick. The only problem is if you have more than
a few .jpg's, you can't see them. My suggestion is to put a frame on
this form and then put the following code into the Enter event of the
frame:
Private Sub Frame1_Enter()
Dim Fldr As String
Dim FName As String
Dim i As Long
Dim cnt As Control
Fldr = "C:\documents and settings\markbi\My Documents\My Pictures\"
FName = Dir(Fldr & "*.jpg")
i = 10
Do While Len(FName) 0
Set cnt = Me.Frame1.Controls.Add("forms.checkbox.1", , True)
cnt.Top = i
cnt.Left = 10
Set cnt = Me.Frame1.Controls.Add("forms.label.1", , True)
cnt.Top = i
cnt.Left = 30
cnt.Caption = FName
i = i + 30
FName = Dir
Loop
Me.Frame1.ScrollHeight = i
End Sub
Again, just a slight improvement to already great code!
Mark
---
Mark Bigelow
mjbigelow at hotmail dot com
http://hm.imperialoiltx.com
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!