Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Is it possible to recalculate a single workbook?

Hi all

I appreciate that you could recalculate each worksheet within a
workbook separately but unless you knew the correct order of dependency
then some results would be wrong when doing this.

So, is it possible to recalculate (with correct dependency) a single
workbook?

Thanks

Lloyd

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Is it possible to recalculate a single workbook?

....according to the online help it doesn't look too promising! (could
you loop through the worksheets a few times?....I'm not sure if this
would mean that knowing the dependency isn't so important)
Rgds
J



Calculate Method
See AlsoApplies ToExampleSpecificsCalculates all open workbooks, a
specific worksheet in a workbook, or a specified range of cells on a
worksheet, as shown in the following table.

To calculate Follow this example
All open workbooks Application.Calculate (or just Calculate)
A specific worksheet Worksheets(1).Calculate
A specified range Worksheets(1).Rows(2).Calculate

expression.Calculate
expression Optional for Application, required for Worksheet and
Range. An expression that returns an object in the Applies To list.

Example
This example calculates the formulas in columns A, B, and C in the used
range on Sheet1.

Worksheets("Sheet1").UsedRange.Columns("A:C").Calc ulate



On Oct 23, 1:13 pm, "pinkfloydfan"
wrote:
Hi all

I appreciate that you could recalculate each worksheet within a
workbook separately but unless you knew the correct order of dependency
then some results would be wrong when doing this.

So, is it possible to recalculate (with correct dependency) a single
workbook?

Thanks

Lloyd


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Is it possible to recalculate a single workbook?

Unfortunately I don't think that will work. To give some more specific
information, I have done the following:

1) Written a control workbook that builds an object from specified
inputs
2) I have an xla that creates those objects and has other functions to
manipulate the data in a specific object and produce certain results
3) In a second Workbook I use those functions to give me the
information I am seeking...but this workbook has a number of
interlinked worksheets so that the dependencies are reasonably
complicated.

I would like to be able to change tweak the inputs that build the
object point-by-point, rebuild the object and see what the change in
result is on the second workbook and then output that list of data.

I suppose that I could close all other workbooks, then run the Tweak
macro, then reopen the closed workbooks but that seems a bit clumsy to
me.

Does anyone have a better solution please?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Is it possible to recalculate a single workbook?


Set calculation to manual, then try:

Activeworkbook.Calculate

--
Regards,
Tom Ogilvy


"pinkfloydfan" wrote:

Hi all

I appreciate that you could recalculate each worksheet within a
workbook separately but unless you knew the correct order of dependency
then some results would be wrong when doing this.

So, is it possible to recalculate (with correct dependency) a single
workbook?

Thanks

Lloyd


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Is it possible to recalculate a single workbook?

A good idea and one I originally tried BUT Calculate is not a method of
ActiveWorkbook or ThisWorkbook

Thanks
Lloyd



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Is it possible to recalculate a single workbook?

Guess your right - my error. Looks like you are back at application, or
calculating each sheet twice or more. Not sure what you are gaining.

you can look at
http://www.decisionmodels.com which might give you some ideas

--
Regards,
Tom Ogilvy


"pinkfloydfan" wrote:

A good idea and one I originally tried BUT Calculate is not a method of
ActiveWorkbook or ThisWorkbook

Thanks
Lloyd


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Is it possible to recalculate a single workbook?

Thanks Tom, that website actually solved my problem in this way:

I inserted the following code before the rest of the Tweak macro:

For Each sh In Workbooks("Setup.xls").Sheets
sh.EnableCalculation = False
Next

And this at the end of it:

For Each sh In Workbooks("Setup.xls").Sheets
sh.EnableCalculation = True
Next

The result is that any recalculations do not impact the worksheets in
the Setup.xls workbook. You have to turn it back on otherwise the
sheets won't recalculate at all. What's also nice is that this setting
is not saved with the workbook

Cheers
Lloyd

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
F9 Manual Recalculate only for one workbook Tenacity9 Excel Discussion (Misc queries) 7 October 2nd 08 03:33 PM
Multiple workbook data imported into single workbook SaipanRick Excel Worksheet Functions 4 June 16th 08 08:22 PM
merging single worksheet files into a single workbook DDK Excel Discussion (Misc queries) 1 December 5th 06 05:25 PM
Workbook only malfunctions on a single PC Crypto Excel Discussion (Misc queries) 3 January 10th 06 11:49 PM
is it possible to use F9 to manually calculate in a single sheet or single workbook? Hersbt Excel Discussion (Misc queries) 2 December 29th 04 04:42 PM


All times are GMT +1. The time now is 10:31 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"