Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default recalulating when hiding rows

Hi,
I have a spreadsheet that uses both live data feeds and several excel
functions. This spreadsheet has a macro that hides/unhides certain
rows. As an example the VBA code used to do this is:

Rows("13:57").EntireRow.Hidden = True

The problem is that with Excel 2003 everytime I do this the extire
spreadsheet recalculates. This is slowing me down tremendously. I
added code to switch the spreadsheet to manual calculation, then
hide/unhide, and then switching the spreadsheet back to automatic
calculation mode. The code is given below:

Application.Calculation = xlCalculationManual
Application.Calculation = xlCalculationAutomatic

This seemed to help a bit in that fewer things seemed to be
recalculating. I read another post with a similar problem who used
the above solution and it seemed to work. He also mentioned that
Excel 2003 evaluates spreadsheet formulas differently than Excel 2002.
Does anyone have any ideas as to how to completely stop the
spreadsheet from updating when I hide/unhide rows?

Thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default recalulating when hiding rows

Not sure if it will help without more info but you can stop the
display from changing when processing the macro

Application.screenupdating = false

and switch back on at the end of the macro

Application.screenupdating = true

I put this in most macros, and it ususlly speeds things up

DavidP

On 10 Nov 2003 09:40:35 -0800, (ctsprowler)
wrote:

Hi,
I have a spreadsheet that uses both live data feeds and several excel
functions. This spreadsheet has a macro that hides/unhides certain
rows. As an example the VBA code used to do this is:

Rows("13:57").EntireRow.Hidden = True

The problem is that with Excel 2003 everytime I do this the extire
spreadsheet recalculates. This is slowing me down tremendously. I
added code to switch the spreadsheet to manual calculation, then
hide/unhide, and then switching the spreadsheet back to automatic
calculation mode. The code is given below:

Application.Calculation = xlCalculationManual
Application.Calculation = xlCalculationAutomatic

This seemed to help a bit in that fewer things seemed to be
recalculating. I read another post with a similar problem who used
the above solution and it seemed to work. He also mentioned that
Excel 2003 evaluates spreadsheet formulas differently than Excel 2002.
Does anyone have any ideas as to how to completely stop the
spreadsheet from updating when I hide/unhide rows?

Thanks for any help.


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
Color alternate rows when after hiding selected rows Monk[_2_] Excel Worksheet Functions 6 June 7th 08 01:36 AM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Copying Rows when hiding other rows Neutron1871 Excel Worksheet Functions 2 November 3rd 04 11:38 PM


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