Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting selection before click
Hello,
On a sheet, I have two shapes (say two Ovals) and an ActiveX button. Let's select one of the two shapes. I want to know when I click on the button, what shape was selected before the button got activated. I could not find an answer after searching for a while as there no event such as beforeclick. Thanks in advance for any help, MrT |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting selection before click
Well, I've just found the answer: you need to set the TakeTheFocus property
to false ... "MrT" wrote: Hello, On a sheet, I have two shapes (say two Ovals) and an ActiveX button. Let's select one of the two shapes. I want to know when I click on the button, what shape was selected before the button got activated. I could not find an answer after searching for a while as there no event such as beforeclick. Thanks in advance for any help, MrT |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting selection before click
If you use a Forms button rather than a Controls button:
Sub WhoGotClicked() MsgBox (Selection.Name) End Sub will tell you which Shape got clicked. -- Gary''s Student - gsnu200908 "MrT" wrote: Well, I've just found the answer: you need to set the TakeTheFocus property to false ... "MrT" wrote: Hello, On a sheet, I have two shapes (say two Ovals) and an ActiveX button. Let's select one of the two shapes. I want to know when I click on the button, what shape was selected before the button got activated. I could not find an answer after searching for a while as there no event such as beforeclick. Thanks in advance for any help, MrT |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting selection before click
The problem of form buttons is that you cannot control many things such as
background color. "Gary''s Student" wrote: If you use a Forms button rather than a Controls button: Sub WhoGotClicked() MsgBox (Selection.Name) End Sub will tell you which Shape got clicked. -- Gary''s Student - gsnu200908 "MrT" wrote: Well, I've just found the answer: you need to set the TakeTheFocus property to false ... "MrT" wrote: Hello, On a sheet, I have two shapes (say two Ovals) and an ActiveX button. Let's select one of the two shapes. I want to know when I click on the button, what shape was selected before the button got activated. I could not find an answer after searching for a while as there no event such as beforeclick. Thanks in advance for any help, MrT |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting selection before click
If your interest is in background color, you can assign a macro to any piece
from the Drawing toolbar and assign any color to the shape. Of course, this ruins your ultimate goal of capturing the shape that got clicked! -- Gary''s Student - gsnu200908 "MrT" wrote: The problem of form buttons is that you cannot control many things such as background color. "Gary''s Student" wrote: If you use a Forms button rather than a Controls button: Sub WhoGotClicked() MsgBox (Selection.Name) End Sub will tell you which Shape got clicked. -- Gary''s Student - gsnu200908 "MrT" wrote: Well, I've just found the answer: you need to set the TakeTheFocus property to false ... "MrT" wrote: Hello, On a sheet, I have two shapes (say two Ovals) and an ActiveX button. Let's select one of the two shapes. I want to know when I click on the button, what shape was selected before the button got activated. I could not find an answer after searching for a while as there no event such as beforeclick. Thanks in advance for any help, MrT |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple cell selection on one click! | Excel Discussion (Misc queries) | |||
sheet selection via user click (yez) | Excel Programming | |||
Detecting double click | Excel Programming | |||
Right click and iterate through selection | Excel Programming | |||
Detecting Row Selection | Excel Programming |