Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting 'xlCalculationManual' to work in lotus script 1

Status
Not open for further replies.

domino1352

IS-IT--Management
Nov 20, 2002
40
AU
I am trying to speed up the creation of a spread sheet but when I try to turn of the automatic calculation it errors out on me


I have tried the following lines
xl.Calculation = xlCalculationManual
xlSheet.application.Calculation = "xlCalculationManual"


here is a code snippet
Set xl = CreateObject("Excel.application")
set xlWbk = xl.Workbooks.Add
Set xlSheet = xlWbk.Worksheets(1)
Call xlSheet.Activate
xl.screenupdating = False
xl.Calculation = "xlCalculationManual"
On Error Goto errorHandler
 
Hi,

Try
xlsheet.enablecalculation = false 'turns off autocalc

Regards.
 
and if you're using xlConstants sunch as xlCalculationmanual DON'T surround them with quotes - that way you're turning hem into strings which xl won't compile into the correct constant

HTH!

Cheers
Nikki
;-)
 
thanks Ploeryan and Nikki the
xlsheet.enablecalculation = false 'turns off autocalc
statement worked (Although I didnot see a huge jump in speed for SS creation )

Thanks again for your prompt replys





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top