Solved

Excel Multi Threading and Manual formulas VB Script

Posted on 2016-08-08
2
62 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

729 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