View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
KC Rippstein hotmail com> KC Rippstein hotmail com> is offline
external usenet poster
 
Posts: 168
Default Cause Cells to update.

Application.Volatile should have fixed the problem. I suggest you post this
question in the Excel Programming newsgroup to get a better answer.
Sorry I cannot help you further.
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"sid" wrote:

On May 9, 11:11 am, KC Rippstein hotmail com <kcrippstein<atdot
wrote:
I see what you're saying...you are calling a ton of user defined functions on
sheet2 that are not refreshing when data on sheet1 is changed.

For each of those functions you created, you have to add this to the begging
of each one:
Application.Volatile

Then they will refresh just like any normal formula.

--
Please remember to indicate when the post is answered so others can benefit
from it later.



"sid" wrote:
On May 9, 10:30 am, KC Rippstein hotmail com <kcrippstein<atdot
wrote:
Use a worksheet change event.
Right-click your main spreadsheet tab and click "View Code."
In the code window for that worksheet is a title bar with 2 dropdown menus..
In the left one select "Worksheet" and in the right one select "Change". You
should see this:
Private Sub Worksheet_Change(ByVal Target As Range)


End Sub


Enter your other function name inside the new sub procedure. So:
Private Sub Worksheet_Change(ByVal Target As Range)
MyFunction
End Sub


The change event is called whenever a change is made to that spreadsheet, so
that's the easiest way to keep your other page updated at all times.
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"sid" wrote:
I have a spreadsheet that spans several hundred cells. On a second SS
I created a totals table. I populate the cells on this table by
calling a function that I wrote in VBA.


The VBA Function loops through a column and creates the appropriate
value and returns it. But when I go back to the main SS and change a
cell the totals SS does not update (call the function again). I
thought that I should be able to hit F9 (recalc), but that does not
help either. The only way that I have found to call the function
again is to go to the cell and exit it with "Enter"
i.e. Cell A2 contains ' = MyFunction("Param1") '


Any help is appreciated.


Sid.- Hide quoted text -


- Show quoted text -


Can't I use that event to cause the second sheet to update all its
cells. I have a lot of functions on the second sheet and I don't want
to have to name all of them again. (and keep them synchronized)


Thanks- Hide quoted text -


- Show quoted text -


I added that statement, but it had not effect.

Not sure how a statement added to the function cause it to update with
a change in the object that is calling it ?
I need to add a property to the first sheet to notify the second sheet
that changes have been made.

Thanks