ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simple Action. Please, could someone tell me how to do this? (https://www.excelbanter.com/excel-programming/410859-simple-action-please-could-someone-tell-me-how-do.html)

shapper

Simple Action. Please, could someone tell me how to do this?
 
Hello,

I have 16 images each one inside one cell in an Excel Worksheet.
Each image is named: img1, img2, img3, ...

Every time a user clicks an image I want to call a VB function named
MyFunction and send the image ID and its position ... how can I do
this?

And from that function how can I change the image visibility?

I have been using C# and VB.NET for a long time but in Visual
Studio ...
I am a little bit confused how this kind of interaction works with
Excel.

Thanks,
Miguel

Don[_30_]

Simple Action. Please, could someone tell me how to do this?
 
On May 13, 9:27*am, shapper wrote:
Hello,

I have 16 images each one inside one cell in an Excel Worksheet.
Each image is named: img1, img2, img3, ...

Every time a user clicks an image I want to call a VB function named
MyFunction and send the image ID and its position ... how can I do
this?

And from that function how can I change the image visibility?

I have been using C# and VB.NET for a long time but in Visual
Studio ...
I am a little bit confused how this kind of interaction works with
Excel.

Thanks,
Miguel


You have to create a different routine for each image. And then you
can set each image's visibilty.

for img4:
private sub rout4()
ActiveSheet.Shapes(img4).Visible = false
end sub

Tim Williams

Simple Action. Please, could someone tell me how to do this?
 
This group is more about programming using VBA within Excel.
For .NET / VSTO you might get more help in a .NET group

Tim

"shapper" wrote in message
...
Hello,

I have 16 images each one inside one cell in an Excel Worksheet.
Each image is named: img1, img2, img3, ...

Every time a user clicks an image I want to call a VB function named
MyFunction and send the image ID and its position ... how can I do
this?

And from that function how can I change the image visibility?

I have been using C# and VB.NET for a long time but in Visual
Studio ...
I am a little bit confused how this kind of interaction works with
Excel.

Thanks,
Miguel





All times are GMT +1. The time now is 05:54 AM.

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