[go: up one dir, main page]

0% found this document useful (0 votes)
77 views5 pages

FX Devode

This document contains the VBA code for the ThisWorkbook class in an Excel workbook. The code includes event handlers that run when the workbook opens and before it closes. When opened, it checks operating system and Excel version requirements. When closed, it unloads userforms and sets object references to Nothing to clean up memory.

Uploaded by

naphal_ntn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views5 pages

FX Devode

This document contains the VBA code for the ThisWorkbook class in an Excel workbook. The code includes event handlers that run when the workbook opens and before it closes. When opened, it checks operating system and Excel version requirements. When closed, it unloads userforms and sets object references to Nothing to clean up memory.

Uploaded by

naphal_ntn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

VBA MACRO ThisWorkbook.

cls
in file: xl/printerSettings.bin - OLE stream: 'VBA/ThisWorkbook'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Attribute VB_Name = "ThisWorkbook"

Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"

Attribute VB_GlobalNameSpace = False

Attribute VB_Creatable = False

Attribute VB_PredeclaredId = True

Attribute VB_Exposed = True

Attribute VB_TemplateDerived = False

Attribute VB_Customizable = True

Option Explicit

Option Base 1

Option Compare Text

Private Sub Workbook_BeforeClose(Cancel As Boolean)

10 OOO0OO00000OOO "Workbook_Close"

20 If UserForms.Count > 0 Then

30 On Error Resume Next

40 Unload OOO00O00O0OOO0

50 Unload OOO00O00OO00OO

60 Unload OOOO00O0O000OO

70 If Not OO00000OO0OO00 Is Nothing Then

80 If Not OO00000OO0OO00.mcTree2 Is Nothing Then

90 OO00000OO0OO00.mcTree2.OO00OO00O00OOO

100 End If

110 If Not OO00000OO0OO00.mcTree Is Nothing Then

120 OO00000OO0OO00.mcTree.OO00OO00O00OOO

130 End If

140 Set OO00000OO0OO00.mcTree2 = Nothing

150 Set OO00000OO0OO00.mcTree = Nothing

160 End If
170 Unload OO00000OO0OO00

180 Unload OOOO00O0O000O0

190 Set OOO00O00O0OOO0 = Nothing

200 Set OOO00O00OO00OO = Nothing

210 Set OOOO00O0O000OO = Nothing

220 Set OO00000OO0OO00 = Nothing

230 Set OOOO00O0O000O0 = Nothing

240 End If

#If Mac Then

270 OO0000O0000000

#Else

250 OOO00OOOOOO000

#End If

260 OOO00000OO00OO

280 OO0000O00000OO

OOOO0O0OOO0OO0:

290 OOO0OO00000O0O

End Sub

Private Sub Workbook_Open()

Dim OOOO0O0OOO0O0O As Date

Dim OOOO0O0OOO0O00 As String

Dim OOOO0O0OOO00OO As Long

#If Mac Then

#If fxlProduct <> 15 Then

10 msgbox "This version of Manager Pro does not run on Mac", vbOKOnly + vbCritical

20 Application.DisplayAlerts = False

30 ThisWorkbook.Close

40 Application.DisplayAlerts = True

#End If

#Else
#If fxlProduct = 15 Then

50 msgbox "This version of Mac Manager Pro does not run on Windows", vbOKOnly +
vbCritical

60 Application.DisplayAlerts = False

70 ThisWorkbook.Close

80 Application.DisplayAlerts = True

#End If

#End If

90 OOOO00O0OO0000 = True

100 If OOOO00O0OO0000 Then

110 OOOO0O0OOO0O0O = DateSerial(2020, 1, 31)

120 If Date > OOOO0O0OOO0O0O Then

130 msgbox "Sorry, but this Beta version of FastExcel Manager Pro has expired",
vbOKOnly + vbCritical

140 ThisWorkbook.Close savechanges:=False

150 End If

160 End If

#If Mac Then

170 If val(Application.version) < 16 Then

180 msgbox "FastExcel Mac Manager Pro requires Mac Excel Version 16", vbOKOnly +
vbCritical

190 Application.DisplayAlerts = False

200 ThisWorkbook.Close

210 Application.DisplayAlerts = True

220 Exit Sub

230 End If

#Else

240 If val(Application.version) < 12 Then

250 msgbox "FastExcel V4 Manager Pro requires Excel Version 2007 or later",
vbOKOnly + vbCritical

260 Application.DisplayAlerts = False


270 ThisWorkbook.Close

280 Application.DisplayAlerts = True

290 Exit Sub

300 End If

#End If

310 OOO0OO00000OOO "WorkBook_Open"

320 OO0000000OO000 = OO0OOO0OO0OOO0()

330 OO00000OO00O0O = OO0OOO0OO0OOOO()

340 OO00000OO0000O = False

350 OOO000OOOO00OO = False

360 If Not OOO000OOOO00OO Then OOO000OO000O00

370 OO0OOOOO0000OO

380 OO0OOOOO000O00

390 OOO0OO0O00000O

400 OOO0OO0O0000O0

410 OO00000OO00OOO = GetSetting(OOOO000OOOOO0O, "Settings", "MgrProKey", "m")

#If Mac Then

Stop

420 O0OOO00OOOO000

#Else

430 If OOOO00O0OO0000 Then

440 Else

450 O0OOO00OO0OO0O

460 End If

#End If

470 OOO00OOOOOO00O

480 OOOO0O0OOO00OO = GetSetting(OOOO000OOOOO0O, "Settings", "LastBuildNotify", 0)

490 If Now() > (OOOO0O0OOO00OO + 13) Then

500 SaveSetting OOOO000OOOOO0O, "Settings", "LastBuildNotify", CLng(Now())

510 OOOO000OOOO00O = O0OOO0OO0O0OOO(OOOO0O0OOO0O00, OOOO000OOOO000, 7)


520 If Len(OOOO000OOOO00O) > 0 And OOOO000OOOO00O <> "#N/A" Then

530 If OOOO000OOOO00O > OOOO00O00O0O0O Then

540 msgbox "A newer build (" & OOOO000OOOO00O & ") of Manager Pro is available
from" & vbCrLf & "http://www.decisionmodels.com/fxl_mgrpro_beta2.htm", vbOKOnly +
vbInformation

550 End If

560 End If

570 End If

580 OO0000O0000OOO

#If Mac Then

590 OO0000O000000O

#End If

OOOO0O0OOO0OO0:

600 OOO0OO00000O0O

End Sub

You might also like