this is code i am useing in my program to load a picture if for some reason the picture is deleted or moved the program will give a error and close down what i need for this to do is have a error trap where if the picture is deleted or moved it will show another picture in the picture box
Code:Private Sub Form_Load() Close arb = 0 'cd2.Filter = "Image Files (*.*)|*.*" Filename$ = cd2.Filename txtpictures.Text = Filename$ Recordlen = Len(person) Filenum = FreeFile Open "c:\program files\bondsman\info.dat" For Random As Filenum Len = Recordlen If carryover > 0 Then Currentrecord = carryover Else Currentrecord = 1 Lastrecord = FileLen("c:\program files\bondsman\info.dat") / Recordlen If Lastrecord = 0 Then Lastrecord = 1 End If ShowCurrentrecord frmPicture.open.Picture = LoadPicture(txtpictures.Text) End Sub
thank you for any help you can give




Reply With Quote