Brett Scott
New Member
Hello.
I am new to the forum but not new to the website. I have been using many of the excel dashboards as bases for a lot of my projects. One piece i need help with is on selecting a cell, it will display the activecell.value to the formula =selectedCell
I have a named range( B23:C261) named AGENTSELECTED. here is the formula im trying to use so when i type in =selectedcell in the document it will display the activecell.value.
i get a runtime error: 1004:
Method 'range' of object'_Worksheet' failed
Can you see what im doing wrong?
I am new to the forum but not new to the website. I have been using many of the excel dashboards as bases for a lot of my projects. One piece i need help with is on selecting a cell, it will display the activecell.value to the formula =selectedCell
I have a named range( B23:C261) named AGENTSELECTED. here is the formula im trying to use so when i type in =selectedcell in the document it will display the activecell.value.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Target, Range("agentselected")) Is Nothing Then
[selectedCell] = ActiveCell.Value
End If
End Sub
i get a runtime error: 1004:
Method 'range' of object'_Worksheet' failed
Can you see what im doing wrong?