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

Hello. Is there a way to essentially do a cell activate event? WhatI'm
trying to do is have a Sub fire if and when a user clicks on any cell within
column F. So for instance, if the user clicks on F5, then Sub Run_Main
executes. Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Cell Activate Event

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Column = 6 Then
With Target
'do your stuff
End With
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

"Steph" wrote in message
...
Hello. Is there a way to essentially do a cell activate event? WhatI'm
trying to do is have a Sub fire if and when a user clicks on any cell

within
column F. So for instance, if the user clicks on F5, then Sub Run_Main
executes. Thanks!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default Cell Activate Event

Wow, I always thought the worksheet_selectionchange event was triggered when
something was entered in the cell (like a doubleclick, or simply typing
something in the cell and hitting enter), not as soon as it was activated.
Learn something new everyday...Thanks Bob!

"Bob Phillips" wrote in message
...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Column = 6 Then
With Target
'do your stuff
End With
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

"Steph" wrote in message
...
Hello. Is there a way to essentially do a cell activate event? WhatI'm
trying to do is have a Sub fire if and when a user clicks on any cell

within
column F. So for instance, if the user clicks on F5, then Sub Run_Main
executes. Thanks!






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Cell Activate Event

Hi Steph,

You might like to look at Chip Pearson's page on Event Procedures at:

http://www.cpearson.com/excel/events.htm

---
Regards,
Norman



"Steph" wrote in message
...
Wow, I always thought the worksheet_selectionchange event was triggered
when something was entered in the cell (like a doubleclick, or simply
typing
something in the cell and hitting enter), not as soon as it was activated.
Learn something new everyday...Thanks Bob!

"Bob Phillips" wrote in message
...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Target.Column = 6 Then
With Target
'do your stuff
End With
End If
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

"Steph" wrote in message
...
Hello. Is there a way to essentially do a cell activate event? WhatI'm
trying to do is have a Sub fire if and when a user clicks on any cell

within
column F. So for instance, if the user clicks on F5, then Sub Run_Main
executes. Thanks!








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
Pasting after Workbook Activate event Michael Malinsky[_2_] Excel Programming 2 June 6th 05 08:01 PM
Worksheet Activate Event Jason Excel Programming 1 October 29th 04 10:39 PM
Userform activate event question dan Excel Programming 1 January 26th 04 04:14 PM
Activate sheet event Mike Fogleman Excel Programming 5 January 18th 04 11:02 PM
Activate event Lynn[_3_] Excel Programming 2 September 13th 03 09:30 PM


All times are GMT +1. The time now is 02:33 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"