Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I created a simple function on VBA as follows: Function Test() As Integer Dim I As Single For I = 17 To 24 Test = (Test + 1) * Range("Examples_1_a_4!B" & I) Next I End Function On my Excel sheet I have on a cell the following: =Test() It works but when I change a value in the range I need to go to the result cell and click enter to the value be updated. Why? Thanks, Miguel |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Miguel
You have to make you funciton volatile, to do so, add this as first line in you sub: Application.Volatile Regards, Per "shapper" skrev i meddelelsen ... Hello, I created a simple function on VBA as follows: Function Test() As Integer Dim I As Single For I = 17 To 24 Test = (Test + 1) * Range("Examples_1_a_4!B" & I) Next I End Function On my Excel sheet I have on a cell the following: =Test() It works but when I change a value in the range I need to go to the result cell and click enter to the value be updated. Why? Thanks, Miguel |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 20, 1:34*pm, "Per Jessen" wrote:
Hi Miguel You have to make you funciton volatile, to do so, add this as first line in you sub: Application.Volatile Regards, Per "shapper" skrev i ... Hello, I created a simple function on VBA as follows: Function Test() As Integer *Dim I As Single *For I = 17 To 24 * *Test = (Test + 1) * Range("Examples_1_a_4!B" & I) *Next I End Function On my Excel sheet I have on a cell the following: =Test() It works but when I change a value in the range I need to go to the result cell and click enter to the value be updated. Why? Thanks, Miguel Thanks, It worked just fine. Thank You, Miguel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
now function not to update | Excel Discussion (Misc queries) | |||
now function not to update | Excel Discussion (Misc queries) | |||
03 to 07 function update | Excel Programming | |||
Don't Update Function | Excel Discussion (Misc queries) | |||
How to get function to update itself with changes | Excel Programming |