Back again! I'm hoping that someone can help. I have a worksheet where I am copying the values that the user double clicks on and I want an input box (if that's the correct thing to use) to allow the USER to advise the named range to paste special the value to. Currently there are three named ranges: ADA (C10:C20), REMODEL (E10:E20) & TTLBID (H10:H20). I would like for the selection the user double clicks on to paste to the same row in the named range selected. Is this possible or am I wishing on a star here? I have a code that actually does the first part which is allowing user to double click & copy values but when it comes to pasting, it wants the user to select where to paste and that's not what I'm looking for. You can tell by my dialogue I'm no where near an expert, more of a novice using excel more and more and just looking for assistance. This is what I have thus far:
Again, any assistance will be greatly appreciated.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
On Error Resume Next
Set ws = ThisWorkbook.Worksheets("SRW-Master")
If Not Intersect(Target, Range("C51:D62")) Is Nothing Then
Cancel = True
ADA = Range("TTLADA_SITEWK")
REMODEL = Range("REMODEL")
TTLBID = Range("TTLBID")
Set Ret = Application.InputBox(Prompt:="Please type ADA, REMODEL or TTLBID to paste value in totals", Type:=1)
On Error GoTo 0
If Not Ret Is Nothing Then
Target.Copy
Ret.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End If
End If
End Sub
Again, any assistance will be greatly appreciated.