Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default doent recalculate on save


Hi All,
I have this workbook that has around 12-15 worksheets.
At present there is a formula gets() that takes a arugument called
"Calc".
now it is set to automatic recalculate in the prefereneces.
so whenever i change a sheet i have to then go to another sheet to
where the calc field resides and just change the number to any number
other then zero and immediately it calculates all the sheets in the
workbook.

So now,I want to recalculate only one sheet at a time instead of all
the sheets and also dont want to depend on the calc field of another
sheet.
So i made the preferences to manual and checked the box that says
'recalculte on save'.
and also in the function gets () im replacling the calc to '6'.
And for each sheet in vba- i wrote:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
ActiveSheet.Calculate
End Sub

But when i do alt+s to save it just saves but does not recalculate.

how do i make it recalculate when it saves..

Please help.
Thanks,
gilligans


--
gilligans
------------------------------------------------------------------------
gilligans's Profile: http://www.excelforum.com/member.php...o&userid=35026
View this thread: http://www.excelforum.com/showthread...hreadid=567193

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default doent recalculate on save

You could use the _BeforeSave event to run Application.Calculate.
This will calculate all open WBs.
Otherwise you can call the .calculate method of each WS in ThisWorkbook

NickHK

"gilligans" wrote
in message ...

Hi All,
I have this workbook that has around 12-15 worksheets.
At present there is a formula gets() that takes a arugument called
"Calc".
now it is set to automatic recalculate in the prefereneces.
so whenever i change a sheet i have to then go to another sheet to
where the calc field resides and just change the number to any number
other then zero and immediately it calculates all the sheets in the
workbook.

So now,I want to recalculate only one sheet at a time instead of all
the sheets and also dont want to depend on the calc field of another
sheet.
So i made the preferences to manual and checked the box that says
'recalculte on save'.
and also in the function gets () im replacling the calc to '6'.
And for each sheet in vba- i wrote:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
ActiveSheet.Calculate
End Sub

But when i do alt+s to save it just saves but does not recalculate.

how do i make it recalculate when it saves..

Please help.
Thanks,
gilligans


--
gilligans
------------------------------------------------------------------------
gilligans's Profile:

http://www.excelforum.com/member.php...o&userid=35026
View this thread: http://www.excelforum.com/showthread...hreadid=567193



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default doent recalculate on save


Thanks Nick,
But I am new to excel and vba. can u be little bit more specific..
I did write the following code for each sheet:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
ActiveSheet.Calculate
End Sub

Is this right, because it is not helping...
its not recalculating..
Please correct me..


Thanks for the help.
Jyothi


--
gilligans
------------------------------------------------------------------------
gilligans's Profile: http://www.excelforum.com/member.php...o&userid=35026
View this thread: http://www.excelforum.com/showthread...hreadid=567193

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default doent recalculate on save

So no formulae on your worksheet or anywhere in the workbook are being
recalculated ?
Even after calling .Calculate ?

NickHK

"gilligans" wrote
in message ...

Thanks Nick,
But I am new to excel and vba. can u be little bit more specific..
I did write the following code for each sheet:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
ActiveSheet.Calculate
End Sub

Is this right, because it is not helping...
its not recalculating..
Please correct me..


Thanks for the help.
Jyothi


--
gilligans
------------------------------------------------------------------------
gilligans's Profile:

http://www.excelforum.com/member.php...o&userid=35026
View this thread: http://www.excelforum.com/showthread...hreadid=567193



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default doent recalculate on save


yes, thats true.
after i change a particular cell, then another cell needs to be update,
cause that has the formula.
So then i do a save.
It just saves . no recalculation done..

gilligans
help



NickHK Wrote:
So no formulae on your worksheet or anywhere in the workbook are being
recalculated ?
Even after calling .Calculate ?

NickHK



--
gilligans
------------------------------------------------------------------------
gilligans's Profile: http://www.excelforum.com/member.php...o&userid=35026
View this thread: http://www.excelforum.com/showthread...hreadid=567193

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
formula will only recalculate when i hit the save button - Andey9 Excel Worksheet Functions 2 July 17th 09 06:14 PM
Recalculate in VBA dhstein Excel Discussion (Misc queries) 3 May 24th 09 08:21 PM
"list unique" instructions fr xldynamic site doent work Khoshravan Excel Worksheet Functions 4 July 17th 07 08:54 AM
Recalculate changes only hmm Excel Discussion (Misc queries) 3 December 18th 06 01:06 PM
Won't recalculate Erin Excel Discussion (Misc queries) 2 January 8th 05 03:56 AM


All times are GMT +1. The time now is 05:33 AM.

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

About Us

"It's about Microsoft Excel"