Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Returning value of active cell

One way:

In your worksheet code module (right-click the worksheet tab and
choose View Code), enter

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
On Error Resume Next
Application.EnableEvents = False
Range("A1").Value = ActiveCell.Value
Application.EnableEvents = True
On Error GoTo 0
End Sub

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = ActiveCell.Address Then
On Error Resume Next
Application.EnableEvents = False
Range("A1").Value = ActiveCell.Value
Application.EnableEvents = True
On Error GoTo 0
End If
End Sub


In article . com,
"Sergio" wrote:

How do I get cell A1 to equal the value of whatever cell is active,
that I click on

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
active cell shading [email protected] Excel Discussion (Misc queries) 4 January 5th 07 02:07 PM
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
Selection starting from active cell Ronald Dodge Excel Discussion (Misc queries) 3 October 10th 06 12:46 AM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM


All times are GMT +1. The time now is 08:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"