Image control cant LoadPicture at runtime!!

S

Sean Arney

Anyone try to assign something like this:

frmSomeForm.imgControl.Picture = LoadPicture(pic.jpg)

I can t find any way to add/change the picture displayed in an image control
(or any other control for that matter) at runtime! It works OK if you want
to define an image at design time through the properties, but then you cant
change it.

Anyone? I have an open ticket at Microsoft over this....

Also, are there any 3rd party control libs available for VBA Mac 2004?

Thanks,

SeanA
 
B

Bob Greenblatt

Anyone try to assign something like this:

frmSomeForm.imgControl.Picture = LoadPicture(pic.jpg)

I can t find any way to add/change the picture displayed in an image control
(or any other control for that matter) at runtime! It works OK if you want
to define an image at design time through the properties, but then you cant
change it.

Anyone? I have an open ticket at Microsoft over this....

Also, are there any 3rd party control libs available for VBA Mac 2004?

Thanks,

SeanA
Yep! Looks like this is not supported on the Macintosh. It seems to use a
type of automation only supported in windows. I have informed Microsoft of
this. The help file should get updated.
 
J

JE McGimpsey

Bob Greenblatt said:
Yep! Looks like this is not supported on the Macintosh. It seems to use a
type of automation only supported in windows. I have informed Microsoft of
this. The help file should get updated.

I think it worked in XL01, but not in XLv.X or XL04.
 
J

Jim Gordon MVP

Hi Sean,

You're making me feel bad because I feel like I should have spotted this bug
before now.

I'm not aware of any control libraries that have been made lately.

I bet this is something they might be able to fix in a future update.

-Jim

--
Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info
 
S

Sean Arney

Jim,
I am going nuts here...I make a CAD system and we send out data records with
"snapshots" of the designs in progress. I have a user form that displays a
flexgrid of CAD file records - when you click on one, it displays a
thumbnail, lets the user create all sorts of reports, but 90% of them need
to include the CAD file picture!! So the db of pictures is a moving target.
Is there any call to the Mac toolbox I can Declare to deliver the pic's
handle to the control?

Gulp...Help,

seanA


Jim Gordon MVP
 
J

Jim Gordon MVP

Hi again,

First, please be sure that Microsoft knows that you really do need the
loadpicture command. In addition to your support incident please use the
feedback feature on the Help menu to send a copy of the dilemma you
expressed.

I can only offer some rather complicated suggestions as a work-around.

Please take a look at the code posted by John Green that's here:
<http://groups.google.com/groups?q=faceid+john+green&hl=en&lr=&ie=UTF-8&selm
=VA.00000599.0017c252%40t8000&rnum=1>

John's code results in a grid with a number and a picture next to it. Maybe
you could do something similar in a worksheet to display the pictures.

Now the task is to get the thumbnail pictures in.
ActiveSheet.Pictures.Insert("Pathname").Select
Would work. You could make hyperlinks from the thumbnails.

This is not as nice as making a proper userform, though. I hope they fix
loadpicture.

-Jim

--
Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top