Hello All,
I was wondering if anyone could help me with this. I've been trying to figure it out for days now, but just can't. below I have a code which allows me to change the value in a cell with a double click. I can do this in any cell in the worksheet. the problem is, I only want to be able to do this in a specific column and no where else in the worksheet. Any assistance is greatly appreciated.
Best Regards,
Ox
Private Sub Worksheet_BeforeDoubleClick(<wbr style="display: inline-block;">ByVal Target As Range, Cancel As Boolean)
ActiveCell.Select
myVar = InputBox("ENTER THE QUANTITY IN THE SPACE PROVIDED (Include a (-) Sign if the QTY is out Going Stock)", "Enter Quantity")
Dim answer As VbMsgBoxResult
answer = MsgBox("Is the Quantity Entered Correct?", vbYesNo, "Enter QTY")
If answer = vbYes Then
ActiveCell.Value = myVar + ActiveCell.Value
End If
If answer = vbNo Then
myVar = InputBox("Enter the Correct Quantity", "Buy or Sell")
ActiveCell.Value = myVar + ActiveCell.Value
End If
End Sub
I was wondering if anyone could help me with this. I've been trying to figure it out for days now, but just can't. below I have a code which allows me to change the value in a cell with a double click. I can do this in any cell in the worksheet. the problem is, I only want to be able to do this in a specific column and no where else in the worksheet. Any assistance is greatly appreciated.
Best Regards,
Ox
Private Sub Worksheet_BeforeDoubleClick(<wbr style="display: inline-block;">ByVal Target As Range, Cancel As Boolean)
ActiveCell.Select
myVar = InputBox("ENTER THE QUANTITY IN THE SPACE PROVIDED (Include a (-) Sign if the QTY is out Going Stock)", "Enter Quantity")
Dim answer As VbMsgBoxResult
answer = MsgBox("Is the Quantity Entered Correct?", vbYesNo, "Enter QTY")
If answer = vbYes Then
ActiveCell.Value = myVar + ActiveCell.Value
End If
If answer = vbNo Then
myVar = InputBox("Enter the Correct Quantity", "Buy or Sell")
ActiveCell.Value = myVar + ActiveCell.Value
End If
End Sub