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

SelectionChange is fired when the cell is selected.

The Change event is fired when a change is made to a cell. Use the Change
event.

--
Regards,
Tom Ogilvy


"Alex McDermott" wrote:

Hi,

I have the following but for the code to work the user needs to goback to
the cell, if they type 100 and then goto another cell nothing happens but
then if revisit the cell it works - what am I doing wrong?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rngActual As Range
Dim rngActualFinish As Range

Set rngActual = Range("Actual")
Set rngActualFinish = Range("ActualFinish")
ColumnID = Range("ActualFinish").Column

If Not Intersect(rngActual, Target) Is Nothing Then
With Cells(ActiveCell.Row, ColumnID)
If Cells(ActiveCell.Row, ColumnID) = "" Then
If ActiveCell.Value = 100 Then
.Interior.ColorIndex = 3
Else
.Interior.ColorIndex = 15
End If

End If
End With
End If
End Sub





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
beforedoubleclick and selectionchange clara Excel Programming 0 April 24th 07 06:52 PM
SelectionChange event Stefi Excel Programming 2 October 28th 04 01:26 PM
SelectionChange Event Squid[_3_] Excel Programming 5 February 11th 04 01:57 PM
selectionchange problem micher Excel Programming 2 January 27th 04 07:15 PM
SelectionChange problem Micher Excel Programming 0 January 23rd 04 10:26 PM


All times are GMT +1. The time now is 09:26 PM.

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"