Thread
:
Automatic Functions?
View Single Post
#
2
Posted to microsoft.public.excel.programming
markwalling
external usenet poster
Posts: 11
Automatic Functions?
add the change event to your sheet's code (right click the tab, view
code)
so:
public sub Worksheet_Change(ByVal Target As Range)
call myfunctionname
end sub
::help file entry::
Change Event
Occurs when cells on the worksheet are changed by the user or by an
external link.
Syntax
Private Sub Worksheet_Change(ByVal Target As Range)
Target The changed range. Can be more than one cell.
Remarks
This event doesn't occur when cells change during a recalculation. Use
the Calculate event to trap a sheet recalculation.
Deleting cells doesn't trigger this event.
wrote:
I thought this would be easy but I can simply not find anything in the
help system.
I have a
vb
function that finds the largest value amoung a range and
essentially spits out the row who has the largest number.
When I type in the =MyFunctionName(), I get the correct value in the
field.
BUT if I change/update any numbers in the data, the function does not
get automatically recalled, so the older now incorrect value remains.
All I can find to correct this is to click back in the cell, provide to
edit it, and click out and the function will refresh with the new
correct value.
Is there anyway for this to happen automatically, like a normal formula
in Excel would?
Reply With Quote
markwalling
View Public Profile
Find all posts by markwalling