In a program I have an image box (ImgPicture) and a command button (CmdGo). What code would I put in CmdGo if I wanted it to load a file? I know that the file destination has to be in the code somewhere. Please Help
Thanks in advance
Printable View
In a program I have an image box (ImgPicture) and a command button (CmdGo). What code would I put in CmdGo if I wanted it to load a file? I know that the file destination has to be in the code somewhere. Please Help
Thanks in advance
[code]
sub cmdgo_click
image1.picture = <imagepath>
end sub
Beres
what you really want is:
CyberSurfer - test your code before posting it next time! :)Code:Private Sub cmdGo_Click()
Dim filename As String
filename = "c:\msh.gif"' or whatever
Image1.Picture = LoadPicture(filename)
End Sub
Yeah, you're right Mark!
Tip 2:
To delete the picture, use ...= LoadPicture()