Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA calculate manually
dear all,
I have the following problem. I have an excel file with a lot of Vlookup's. I also run in VBA-macro in this excel file. This macro take a long time because these vlookup's. When I calculate my excel manually (adaption in tools- options-calculations-manual) then my macro is much faster. Do you have an idea how I can take this into account in my macro? Otherwise I always have to click on F9 and run my macro. Thanks for any response, Jan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA calculate manually
Hi Jan
Insert into your macro Application.Calculation = xlManual ' your dramatic actions here, and Application.Calculation = xlAutomatic HTH. Best wishes Harald "Jan" skrev i melding ... dear all, I have the following problem. I have an excel file with a lot of Vlookup's. I also run in VBA-macro in this excel file. This macro take a long time because these vlookup's. When I calculate my excel manually (adaption in tools- options-calculations-manual) then my macro is much faster. Do you have an idea how I can take this into account in my macro? Otherwise I always have to click on F9 and run my macro. Thanks for any response, Jan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA calculate manually
Set the calculation in the macro using
Private Sub MakeBig Change() On Error Goto ErrorHandler application.caculation = xlManual 'Do that voodoo that you do application.calculation = xlAutomatic exit sub ErrorHandler: application.calculation = xlAutomatic end sub I highly recommend an error handler any time you change an application level setting such as calculation or EnableEvents, to reset the system when something crashes, because if you do enough of this stuff eventually something will crash. "Jan" wrote: dear all, I have the following problem. I have an excel file with a lot of Vlookup's. I also run in VBA-macro in this excel file. This macro take a long time because these vlookup's. When I calculate my excel manually (adaption in tools- options-calculations-manual) then my macro is much faster. Do you have an idea how I can take this into account in my macro? Otherwise I always have to click on F9 and run my macro. Thanks for any response, Jan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I calculate the interest payment manually (without using IP | Excel Worksheet Functions | |||
How do I manually calculate this formula PV(P3/1200,Q3,-N3*M3/100 | Excel Worksheet Functions | |||
is it possible to use F9 to manually calculate in a single sheet or single workbook? | Excel Discussion (Misc queries) | |||
Single Sheet - Calculate Manually | Excel Programming | |||
Single Sheet - Calculate Manually | Excel Programming |