what variable types will hold pictures?
Printable View
what variable types will hold pictures?
It depends on what you are doing, and how you are doing it - but the most likely one is StdPicture
now an error comes up saying variable not set
I am just holding the picture value of a picturebox.
Are we supposed to somehow know what code is causing that error? :confused:Quote:
Originally Posted by Kaimonington
I just say
Code:variable = picture1.picture
As it is not a simple data type (Integer/String/...), you need to Set it, eg:
And when you have finished with it, you should close it if appropriate (not for StdPicture), and then set it to nothing, eg:Code:Set variable = picture1.picture
Code:Set variable = Nothing
You could also load it from the resource editor
cmdButton.Picture = LoadResPicture(113, vbResBitmap)