Filehost.ro - gazduire fisiere
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
Anna281 pe Simpatie
Femeie
24 ani
Iasi
cauta Barbat
26 - 45 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[EXCEL] Make Auto Calculation Active When Workbook Open [VBA ADD-IN]

Pagini: 1 Moderat de TRaP, TonyTzu
#1
TRaP
Moderator
Postari: 960
Source:
https://www.ozgrid.com/forum/forum/help ... -calculate

Open excel and copy the code below to ThisWorkbook code in VBA. Afterwards save the file as XLAM (add-in). Reopen excel and under Add-ins browse for your previously created file and load it.


Option Explicit

Private WithEvents app As Application

Private Sub workbook_Open()
    Set app = Application
End Sub

Private Sub app_NewWorkbook(ByVal Wb As Workbook)
        Application.OnTime Now + TimeSerial(0, 0, 2), Me.CodeName & ".SetCalcMode"
End Sub

Private Sub app_WorkbookOpen(ByVal Wb As Workbook)
    Application.OnTime Now + TimeSerial(0, 0, 2), Me.CodeName & ".SetCalcMode"
End Sub

Private Sub SetCalcMode()
On Error Resume Next
    Application.Calculation = xlAutomatic
End Sub


 
   
Pagini: 1  
Mergi la