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

Tuesday, January 20, 2009

Excel - Turn off AutoCalculation with VBA Code

Public Function TurnOffAutoCalc()
Application.Calculation = xlManual
End Function

Public Function TurnOnAutoCalc()
Application.Calculation = xlAutomatic
End Function

Tuesday, December 16, 2008

Microsoft Excel - VBA Function Get Active File Name

'just paste this into a VBA module
'johnson.1965@gmail.com
'14-dec-08

Function GetNameOfFile() as string

Dim wb as Workbook
set wb = Application.ActiveWorkbook

GetNameOfFile = wb.FullName
End Function