Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Bob Phillips: Program Right Mouse clicks?

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
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
Count and Reset Button Clicks Arlen Excel Discussion (Misc queries) 3 May 12th 10 04:33 AM
Disable mouse clicks on a range of cells with validations GarySD Excel Discussion (Misc queries) 1 January 27th 10 02:00 PM
Counting clicks rengewwj[_2_] Excel Discussion (Misc queries) 5 December 23rd 08 08:14 PM
Repetitive keystrokes and/or mouse clicks Lydia Ferguison Excel Discussion (Misc queries) 1 August 8th 08 07:00 PM
Plot where mouse clicks Leo Excel Programming 1 November 14th 03 02:50 PM


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