ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Turn Calculations On without Calculation when Turned on (https://www.excelbanter.com/excel-programming/330117-turn-calculations-without-calculation-when-turned.html)

robertjtucker

Turn Calculations On without Calculation when Turned on
 

Hello All,
I have a workbook that has a worksheet that is about 28000 lines that
one of my sheets does a lookup on. My thing is that top of each column
the labels are sort buttons. So when ever I sort a column you can see a
blue wave becuase my table is so big. I played with turning calculations
off at the beginning of the macro and back on at the end. But when it
turns the calculations back on the calculations automatically start. I
need the calculations on for when who ever is keying into the sheet
it'll populate from my lookup, but for the sort it'll be best if it was
off. But how can I have the best of both worlds.
Hope someone has an answer thanks for the help as always,
Bob


--
robertjtucker
------------------------------------------------------------------------
robertjtucker's Profile: http://www.excelforum.com/member.php...o&userid=21805
View this thread: http://www.excelforum.com/showthread...hreadid=374002


STEVE BELL

Turn Calculations On without Calculation when Turned on
 
robert,

Have you tried any of the following in your code:

Application.ScreenUpdating = False ' turns the screen static during code
Application.EnableEvents = False ' turns off all event macros during
code
Application.Calculation = xlCalculationManual ' turns auto-calculate off

* your code *

* reset the above

--
rand451
"robertjtucker"
wrote in message
news:robertjtucker.1plpvl_1117047665.3198@excelfor um-nospam.com...

Hello All,
I have a workbook that has a worksheet that is about 28000 lines that
one of my sheets does a lookup on. My thing is that top of each column
the labels are sort buttons. So when ever I sort a column you can see a
blue wave becuase my table is so big. I played with turning calculations
off at the beginning of the macro and back on at the end. But when it
turns the calculations back on the calculations automatically start. I
need the calculations on for when who ever is keying into the sheet
it'll populate from my lookup, but for the sort it'll be best if it was
off. But how can I have the best of both worlds.
Hope someone has an answer thanks for the help as always,
Bob


--
robertjtucker
------------------------------------------------------------------------
robertjtucker's Profile:
http://www.excelforum.com/member.php...o&userid=21805
View this thread: http://www.excelforum.com/showthread...hreadid=374002




robertjtucker[_2_]

Turn Calculations On without Calculation when Turned on
 

Yes I have tried those see the thing is after the sort is done and the
macro is finished I need the calculations on for the lookups to
populate. I don't want the people using this to have to hit a button to
update. In the beginning of the macro the calculations get turned off,
but at the end I turn them back on. That is when the autocalculations
start and it adds 4-5 seconds but some times it plays tricks with the
sort. I don't want the calculations on at all for the sort, but I need
it on for the lookups.


--
robertjtucker
------------------------------------------------------------------------
robertjtucker's Profile: http://www.excelforum.com/member.php...o&userid=21805
View this thread: http://www.excelforum.com/showthread...hreadid=374002



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com