Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Cause Cells to update.

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default Cause Cells to update.

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Cause Cells to update.

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


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default Cause Cells to update.

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



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Cause Cells to update.

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







  #6   Report Post  
Posted to microsoft.public.excel.misc
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






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Cause Cells to update.

On May 9, 4:51*pm, KC Rippstein hotmail com <kcrippstein<atdot
wrote:
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- Hide quoted text -


- Show quoted text -


It did, but not until I hit F9
Don't understand that, but now it updates everytime !

Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
update protected cells Hernan Excel Discussion (Misc queries) 2 October 27th 07 05:53 PM
Cells don't update!! aposatsk Excel Discussion (Misc queries) 4 August 18th 06 08:41 PM
Linked cells won't update Greg Wetzel Excel Discussion (Misc queries) 3 March 10th 06 08:35 PM
How do I link a row of cells in wks 1 to update diff cells wks 2 Andy Excel Worksheet Functions 1 February 10th 06 04:27 PM
Automatically update cells Maddoktor Excel Discussion (Misc queries) 1 December 8th 05 12:56 AM


All times are GMT +1. The time now is 01:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"