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
(Microsoft MVP from July 2007 to June 2017) . . . . . . . . . . Hitchhiker's Guide to Getting Help at VBForums Database Development FAQs/Tutorials (updated May 2011) (includes fixing common DB related errors, and [VB.Net] ADO.Net Tutorial, and [Classic VB] ADO tutorial /further steps) other useful DB bits: . Connection strings (alternative copy).•. MDAC/Jet/ACE downloads .•. SQL Server downloads . Classic VB FAQs (updated Oct 2010) (includes fixing common VB errors) some of my Classic VB bits: . Tutorial: How to automate Excel from VB6 (or VB5/VBA) .•. SQL 'Select' statement formatter/checker .•. Convert colour number to colour name .•. FlexGrid: fill from recordset .•. FlexGrid: AutoSize columns .•. DB Reserved Words checker .
now an error comes up saying variable not set
I am just holding the picture value of a picturebox.
Originally Posted by Kaimonington now an error comes up saying variable not set Are we supposed to somehow know what code is causing that error?
I just say Code: variable = picture1.picture
variable = picture1.picture
As it is not a simple data type (Integer/String/...), you need to Set it, eg: Code: Set variable = picture1.picture 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 = Nothing
Set variable = picture1.picture
Set variable = Nothing
You could also load it from the resource editor cmdButton.Picture = LoadResPicture(113, vbResBitmap)
Forum Rules