Maintain image selection

R

RLang

Hi,
I arrange a number of imported product defect images on a worksheet.
These images are related to other descriptive data. The images are simple
gray scale jpg's of minimal size. To bring the images in, I'm using the
.....Shapes.AddPicture function. I'd like the user to be able to custom
select any of the images using <Ctrl> click then click a button to launch a
routine which does something based only on the selected images.
Unfortunately the image selections "deselect" as soon as the macro button is
hit. How can I maintain the image selections when another command button is
clicked?
 
J

Jim Cone

You can assign code directly to a picture.
Right-click the picture and choose Assign macro.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"RLang" <[email protected]>
wrote in message
Hi,
I arrange a number of imported product defect images on a worksheet.
These images are related to other descriptive data. The images are simple
gray scale jpg's of minimal size. To bring the images in, I'm using the
.....Shapes.AddPicture function. I'd like the user to be able to custom
select any of the images using <Ctrl> click then click a button to launch a
routine which does something based only on the selected images.
Unfortunately the image selections "deselect" as soon as the macro button is
hit. How can I maintain the image selections when another command button is
clicked?
 
R

RLang

Hi Jim,
Thanks for responding. I didn't make this clear but the user will often
times select more than one image before initiating the macro to process the
selected images. At any time, there may be hundreds of images displayed for
the user. I'd rather not bury event code behind the images themselves. What
I've done is bypassed a command button and placed a label (simulating a
button) instead on the spreadsheet. It won't "press-in" when clicked but if
the user keeps the <Ctrl> key pressed when clicking the label, I can launch
code behind the label without losing the image selections.
 
J

Jim Cone

You should consider using the Shift key instead of the Ctrl key
when selecting images. You are going to end up with multiple copies
of the images at some point using the Ctrl key.
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"RLang" <[email protected]>
wrote in message
Hi Jim,
Thanks for responding. I didn't make this clear but the user will often
times select more than one image before initiating the macro to process the
selected images. At any time, there may be hundreds of images displayed for
the user. I'd rather not bury event code behind the images themselves. What
I've done is bypassed a command button and placed a label (simulating a
button) instead on the spreadsheet. It won't "press-in" when clicked but if
the user keeps the <Ctrl> key pressed when clicking the label, I can launch
code behind the label without losing the image selections.
 
R

RLang

Ok, good advice Jim. I assumed that the Shift key would select "all
in-between" but a trial showed that it didn't. Thanks for the dialog.
 

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