livetolearn4life
New Member
- Joined
- Jul 14, 2020
- Messages
- 15
- Office Version
- 2019
- 2016
- 2013
- Platform
- Windows
Hello, don't know what is going on here.. I want to copy a value in any cell clicked on in column D on one sheet and automatic paste that value only in cell A1 of the "Dashboard" sheet.. not sure if it is a problem or not, but column A1 in the "Dashboard" sheet is set a drop down list... But the issue is im getting the 1004 run time error at the "Range("A1").Select line below.
Sub Worksheet_SelectionChange(ByVal Target As Range) 'single click version
If Intersect(Target, Range("D:D")) Is Nothing Then
Application.CutCopyMode = False 'clears clipboard and stops cell flashing - like pushing escape key
Exit Sub
Else
ActiveCell.Copy
End If
If Target.Column <> 4 Then Exit Sub
Sheets("DASHBOARD").Select
Range("A1").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Sub Worksheet_SelectionChange(ByVal Target As Range) 'single click version
If Intersect(Target, Range("D:D")) Is Nothing Then
Application.CutCopyMode = False 'clears clipboard and stops cell flashing - like pushing escape key
Exit Sub
Else
ActiveCell.Copy
End If
If Target.Column <> 4 Then Exit Sub
Sheets("DASHBOARD").Select
Range("A1").Select
Selection.PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub