- Joined
- Jan 22, 2005
I am making a program that I need a picture on a form to change depending on the users input. Is it possible to change an image after the program is running? I would just use multiple images and play with the visible property but there are too many pictures.
This is a simple example of what i am trying to do:
Private Sub Go1_Click()
Image1.Picture = "C:\Documents and Settings\User\Desktop\Test\Go1.jgp"
End Sub
Private Sub Go2_Click()
Image1.Picture = "C:\Documents and Settings\User\Desktop\Test\Go2.jgp"
End Sub
Private Sub Go3_Click()
Image1.Picture = "C:\Documents and Settings\User\Desktop\Test\Go3.jgp"
End Sub
Those command go to three buttons that I was trying to get an image so change. However when I run the program and press the button I get a "type mismatch" error.
Anyone know how I can whoop this problem?
This is a simple example of what i am trying to do:
Private Sub Go1_Click()
Image1.Picture = "C:\Documents and Settings\User\Desktop\Test\Go1.jgp"
End Sub
Private Sub Go2_Click()
Image1.Picture = "C:\Documents and Settings\User\Desktop\Test\Go2.jgp"
End Sub
Private Sub Go3_Click()
Image1.Picture = "C:\Documents and Settings\User\Desktop\Test\Go3.jgp"
End Sub
Those command go to three buttons that I was trying to get an image so change. However when I run the program and press the button I get a "type mismatch" error.
Anyone know how I can whoop this problem?