Solved

Excel Multi Threading and Manual formulas VB Script

Posted on 2016-08-08
2
23 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
  • 2
2 Comments
 
LVL 17

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 17

Expert Comment

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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now