ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Maintain image selection (https://www.excelbanter.com/excel-programming/410835-maintain-image-selection.html)

RLang

Maintain image selection
 
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?

Jim Cone[_2_]

Maintain image selection
 

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"
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?

RLang

Maintain image selection
 
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.

"Jim Cone" wrote:


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"
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?


Jim Cone[_2_]

Maintain image selection
 

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"
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.



"Jim Cone" wrote:
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"
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?


RLang

Maintain image selection
 
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.

"Jim Cone" wrote:


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"
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.



"Jim Cone" wrote:
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"
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?




All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com