Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write a script that has the result of only allowing one
value within a range at any time. So if the user puts new value in the range the range is cleared except for the new value. The below works but if the user moves the cursor into the range it gets cleared. I only want to it clear and use the new value if a new value is entered in it. use the the Change event creates a recursive problem where it keeps changing and repeating. Any other ideas? Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim inputval As Variant Dim c As Variant inputval = Target.Value 'If Target.Row = 3 Then For Each c In Range("testrng") If c.Address = Target.Address Then 'MsgBox Target.Value Range("testrng").Clear Target.Value = inputval End If Next c End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |