Solved

Excel Multi Threading and Manual formulas VB Script

Posted on 2016-08-08
2
53 Views
Last Modified: 2016-09-10
HI
I want to be able to create a XLAM file using Vbscript that will do 2 things
1 = Set formula calculation to manual and calculate before save to True
2 = Disable Multi thread calculation

I can get the disable multi thread calc to work using this script and placing he xlam file in the XLStart

Private Sub Workbook_Open()
    ' Disable MultiThreaded Calculation '
    Application.MultiThreadedCalculation.Enabled = False
     
    ' Other options '
   
    ' Automatic Mode '
    ' Application.MultiThreadedCalculation.ThreadMode = xlThreadModeAutomatic '
   
    ' Manual Mode '
    ' Application.MultiThreadedCalculation.ThreadMode = xlThreadModeManual '
   
    ' Use 2 CPU '
    ' Application.MultiThreadedCalculation.ThreadCount = 2 '
   
End Sub

But when I try to add in the manual formula part using this script it does not work

Application.Calculation = xlManual
    Application.CalculateBeforeSave = True

Can you help me as I am not at all good with VB script
Thanks Marcus
0
Comment
Question by:nathantrevor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 18

Accepted Solution

by:
xtermie earned 500 total points (awarded by participants)
ID: 41765254
Try doing it before you disable multi thread calcs
Private Sub Workbook_Open()
 Application.Calculation = xlManual
 Application.CalculateBeforeSave = True
 ' Disable MultiThreaded Calculation '
 Application.MultiThreadedCalculation.Enabled = False
....
End Sub

Open in new window

0
 
LVL 18

Expert Comment

by:xtermie
ID: 41792449
Provided code based on question but no feedback from author
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBScript Issues 8 47
VBA & VBSCRIPT: re-adapt log file 13 41
VBA taking too long 5 28
VB script help 23 36
In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question