Showing posts with label VBA. Show all posts
Showing posts with label VBA. Show all posts

Friday, September 6, 2013

Excel VBA - VSTO Speed Up Speed Down Functions

Sub SpeedUp()
       
    Application.EnableCancelKey = xlDisabled
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

End Sub

Sub SpeedDown()
   
    Application.Calculation = xlCalculationAutomatic
    Application.Calculate
    Application.ScreenUpdating = True
   
    Application.EnableCancelKey = xlInterrupt
End Sub

Monday, November 5, 2012

vba automation error the object invoked has disconnected from its clients

vba automation error the object invoked has disconnected from its clients



if you encounter this error, just delete the worksheet and recreate it.
while copying and pasting data, use another instance of excel workbook and worksheet.

first copy data to another temp excel, 
create new worksheet
copy data from temp excel to new worksheet