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

S

shapper

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
 
D

Don

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
 
T

Tim Williams

This group is more about programming using VBA within Excel.
For .NET / VSTO you might get more help in a .NET group

Tim
 

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