Help me with this code...I have just started Learning VB6!
This is my 4th code and it's a mixture of Image Box,Label Box and 4 option buttons. I have written the code but i'm getting a error as "Object Required". My code is as Follows:
The Question is choose a Option of your pet and with that the required image will also be displayed!
Private Sub OptDog_Click()
Image1.Picture = LoadPicture("C:\Users\PC\Desktop\germanshepherd.jpg")
Private Sub OptCat_Click()
Image2.Picture = LoadPicture("C:\Users\PC\Desktop\lacykittens.jpg")
Private Sub OptParrot_Click()
Image3.Picture = LoadPicture("C:\Users\PC\Desktop\parrotcracker.jpg")
Private Sub OptGuinneaPig_Click()
Image4.Picture = LoadPicture("C:\Users\PC\Desktop\guineapig.jpg")
Re: Help me with this code...I have just started Learning VB6!
You said you have image box as in one image box and 4 option buttons but your code is referencing 4 image boxes. If your intent is to change the picture when the option is selected then you need to change the code to point to the image box that actually exists in all cases. i.e. Image1