Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi All,
I have a very simple UDF returning the address of the selected cell: Public Function AktCell() As String AktCell = ActiveCell.Address(False, False) End Function It works fine when I newly insert it in a cell, but doesn't refresh the cell when I select another cell despite I have a Calculation line a Selection_change event! How can I force the UDF to run when selecting a new cell? Thanks, Stefi |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Add this
application.volatile -- Regards, Peo Sjoblom (No private emails please) "Stefi" wrote in message ... Hi All, I have a very simple UDF returning the address of the selected cell: Public Function AktCell() As String AktCell = ActiveCell.Address(False, False) End Function It works fine when I newly insert it in a cell, but doesn't refresh the cell when I select another cell despite I have a Calculation line a Selection_change event! How can I force the UDF to run when selecting a new cell? Thanks, Stefi |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
as the first line in the function
-- Don Guillett SalesAid Software "Peo Sjoblom" wrote in message ... Add this application.volatile -- Regards, Peo Sjoblom (No private emails please) "Stefi" wrote in message ... Hi All, I have a very simple UDF returning the address of the selected cell: Public Function AktCell() As String AktCell = ActiveCell.Address(False, False) End Function It works fine when I newly insert it in a cell, but doesn't refresh the cell when I select another cell despite I have a Calculation line a Selection_change event! How can I force the UDF to run when selecting a new cell? Thanks, Stefi |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Fine, it works, thanks!
Regards, Stefi €˛Peo Sjoblom€¯ ezt Ć*rta: Add this application.volatile -- Regards, Peo Sjoblom (No private emails please) "Stefi" wrote in message ... Hi All, I have a very simple UDF returning the address of the selected cell: Public Function AktCell() As String AktCell = ActiveCell.Address(False, False) End Function It works fine when I newly insert it in a cell, but doesn't refresh the cell when I select another cell despite I have a Calculation line a Selection_change event! How can I force the UDF to run when selecting a new cell? Thanks, Stefi |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
There is nothing in the function that forces a recalculation of the
function. Even if you put Application.Volatile in there it will only recalculate when you have something that forces a sheet recalculation.selecting another cell does not do that You can do it with an event procedure Private Sub Worksheet_SelectionChange(ByVal Target As Range) Me.Range("showactive").Value = Target.Address(False, False) End Sub where showactive is the name of a cell to show the active cell address -- HTH RP (remove nothere from the email address if mailing direct) "Stefi" wrote in message ... Hi All, I have a very simple UDF returning the address of the selected cell: Public Function AktCell() As String AktCell = ActiveCell.Address(False, False) End Function It works fine when I newly insert it in a cell, but doesn't refresh the cell when I select another cell despite I have a Calculation line a Selection_change event! How can I force the UDF to run when selecting a new cell? Thanks, Stefi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Forcing Cell Entries to be Upper Case | Excel Worksheet Functions | |||
Forcing data value in a cell | Excel Discussion (Misc queries) | |||
Forcing Excel to Load Below Office Toolbar | Excel Discussion (Misc queries) | |||
Forcing page breaks | Excel Discussion (Misc queries) | |||
Forcing text onto new line in cell | New Users to Excel |