value of the active cell
Is there a function that would allow me to get the value of the active cell?
like it is done in VBA: Activecell.value thanks -- caroline |
value of the active cell
Not a function, worksheet functions do not know what the active cell is, you
need event code for this 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Me.Range("H10").Value = ActiveCell.Value End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "caroline" wrote in message ... Is there a function that would allow me to get the value of the active cell? like it is done in VBA: Activecell.value thanks -- caroline |
value of the active cell
Thanks That is what I thought.
-- caroline "Bob Phillips" wrote: Not a function, worksheet functions do not know what the active cell is, you need event code for this 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Me.Range("H10").Value = ActiveCell.Value End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "caroline" wrote in message ... Is there a function that would allow me to get the value of the active cell? like it is done in VBA: Activecell.value thanks -- caroline |
All times are GMT +1. The time now is 04:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com