Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 358
Default Selection_Activate

Hi,

I have seen code for Private Sub Worksheet_Change which allows code to be
excecuted as a result of a change to a cell but is there anything that can
identify when a cell is simply selected?
--
Andrew
  #2   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default Selection_Activate

Hi,

Try this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Me.[A1]) Is Nothing Then _
MsgBox "Hello World!"
End Sub

Regards,
KL

"Andrew" wrote in message
...
Hi,

I have seen code for Private Sub Worksheet_Change which allows code to be
excecuted as a result of a change to a cell but is there anything that can
identify when a cell is simply selected?
--
Andrew



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Selection_Activate

Look at the Worksheet_SelectionChange event.

--

Vasant

"Andrew" wrote in message
...
Hi,

I have seen code for Private Sub Worksheet_Change which allows code to be
excecuted as a result of a change to a cell but is there anything that can
identify when a cell is simply selected?
--
Andrew



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



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

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

About Us

"It's about Microsoft Excel"