Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So I am having trouble programming the "delete" code to delete the value
in Column C when the user selects Option 3, or Option "" with the left mouse button.... Its weird. The code works in terms of deleting the number in Column C, but now a Red Selction (#2) freezes at "1" in Column C....In other words. If the cell is red, you now can't cyle through the numbers 1-3.....it sticks at 1. here is the code that doesn't work: __________________ Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("A1:A50")) Is Nothing Then If Target.Count = 1 Then With Target oldValue = .Offset(0, 1).Value Select Case .Offset(0, 1).Value Case 1: .Offset(0, 1).Value = 2 Case 2: .Offset(0, 1).Value = 3 Case 3: .Offset(0, 1).Value = "" Case Else: .Offset(0, 1).Value = 1 End Select End With SetColour Target ZeroOut Target '<--------------------- Calls my sub End If Target.Offset(0, 1).Select End If End Sub __________ Private Sub ZeroOut(Target As Range) If Not Intersect(Target, Range("A1:A50")) Is Nothing Then With Target If .Offset(0, 1).Value = 3 Then ..Offset(0, 2).Value = "" ElseIf .Offset(0, 1).Value = "" Then ..Offset(0, 2).Value = "" End If End With End If End Sub _____________ --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count and Reset Button Clicks | Excel Discussion (Misc queries) | |||
Disable mouse clicks on a range of cells with validations | Excel Discussion (Misc queries) | |||
Counting clicks | Excel Discussion (Misc queries) | |||
Repetitive keystrokes and/or mouse clicks | Excel Discussion (Misc queries) | |||
Plot where mouse clicks | Excel Programming |