userform image from picture in worksheet

D

Doug Glancy

I've moved on from tic-tac-toe and am now creating a concentration game on a
userform. The form has a bunch of Image controls. I change the pictures
(.wmf) using the LoadPicture method. It works fine when I load the clip
from a file. However, I was hoping to store all the clips in the same
workbook as the form and load them from there. LoadPicture doesn't seem to
work, which makes sense. I then tried something like:

Image1.Picture = thisworkbook.worksheets("birds").shapes("birds1")

but if this is possible, I haven't found the right syntax.

I remembered John W.'s cut and paste method into the properties picture box
and that works, but I need to do it during runtime. I've read of, but
haven't tried, Stephen Bullen's clipboard method. I'll try that next but
first I thought I'd ask the group for any suggestions.

Thanks,

Doug
 
D

Darren Hill

Could you have all pictures set up in design time, but set their Visible
properties to False. Then when you need them, set Visible to True and move
them to where you need them?
 
D

Doug Glancy

Darren,

That might work. I'm basically working with differents sets of cards --
birds, mammals, etc.. When a user (i.e me or my daughter) picks a card I
load the picture, based on a random array of paired integers. I was
thinking that it would be great to have all the pictures stored in the
worksheets, but your suggestion takes it one step further -- I could just
store them out of sight in the userform, or on other userforms , and copy
them over.

I'll give it a try.

Thanks,

Doug
 

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