Heavenly
Well-known member
This code erases all 18 pictureboxes and Images from the form:
How can I modify it so it only removes the IMAGES without erasing the pictureboxes?
Sub RemovePhotos()
Dim Pic As Control
For Each Pic In formSelectedItems.Controls
If TypeOf Pic Is PictureBox Then
formSelectedItems.Controls.Remove(Pic)
Pic.Dispose()
End If
Next
End Sub
How can I modify it so it only removes the IMAGES without erasing the pictureboxes?
Sub RemovePhotos()
Dim Pic As Control
For Each Pic In formSelectedItems.Controls
If TypeOf Pic Is PictureBox Then
formSelectedItems.Controls.Remove(Pic)
Pic.Dispose()
End If
Next
End Sub