Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
mrt mrt is offline
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
mrt mrt is offline
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
mrt mrt is offline
external usenet poster
 
Posts: 70
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple cell selection on one click! v Excel Discussion (Misc queries) 3 January 5th 10 03:40 PM
sheet selection via user click (yez) Yossi evenzur[_2_] Excel Programming 1 January 24th 08 03:27 PM
Detecting double click kirkm[_6_] Excel Programming 5 February 8th 07 02:52 PM
Right click and iterate through selection Paulymon Excel Programming 1 December 10th 05 08:31 PM
Detecting Row Selection Nigel Excel Programming 1 January 2nd 05 03:48 PM


All times are GMT +1. The time now is 04:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"