Skip to content

Commit de398f8

Browse files
authored
Show new version info in configuration form (#49)
1 parent 4dd870f commit de398f8

12 files changed

+222
-213
lines changed

access-add-in/AccUnitLoader.accda

-8 KB
Binary file not shown.

access-add-in/source/forms/AccUnitLoaderForm.bas

Lines changed: 168 additions & 151 deletions
Large diffs are not rendered by default.

access-add-in/source/forms/AccUnitLoaderForm.cls

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,14 @@ End Sub
221221

222222
Private Sub Form_Load()
223223

224-
CheckAccUnitTypeLibFile CodeVBProject
224+
Dim ReferenceFixed As Boolean
225+
Dim ReferenceFixedMessage As String
226+
227+
On Error GoTo ErrMissingPath
228+
CheckAccUnitTypeLibFile CodeVBProject, ReferenceFixed, ReferenceFixedMessage
229+
If Len(ReferenceFixedMessage) Then
230+
Me.labInfo.Caption = ReferenceFixedMessage
231+
End If
225232

226233
With CurrentApplication
227234
Me.Caption = .ApplicationTitle & " " & VBA.ChrW(&H25AA) & " Version " & .Version
@@ -230,16 +237,15 @@ Private Sub Form_Load()
230237
LoadIconFromAppFiles
231238

232239
With CurrentAccUnitConfiguration
233-
On Error GoTo ErrMissingPath
234240
Me.txtAccUnitDllPath.Value = .AccUnitDllPath
235-
On Error GoTo 0
236241
End With
237242

238243
SetEnableMode
239244

240245
Exit Sub
241246

242247
ErrMissingPath:
248+
ShowErrorHandlerInfo Err.Description
243249
Resume Next
244250

245251
End Sub

access-add-in/source/modules/_config_Application.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Option Compare Text
1818
Option Explicit
1919

2020
'Version number
21-
Private Const APPLICATION_VERSION As String = "0.9.401.240323"
21+
Private Const APPLICATION_VERSION As String = "0.9.402.240323"
2222

2323
Private Const APPLICATION_NAME As String = "ACLib AccUnit Loader"
2424
Private Const APPLICATION_FULLNAME As String = "Access Code Library - AccUnit Loader"

access-add-in/source/modules/modTypeLibCheck.bas

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ Public Property Get DefaultAccUnitLibFolder() As String
2121
DefaultAccUnitLibFolder = FilePath & "lib"
2222
End Property
2323

24-
Public Sub CheckAccUnitTypeLibFile(Optional ByVal VBProjectRef As VBProject = Nothing, Optional ByRef ReferenceFixed As Boolean)
24+
Public Sub CheckAccUnitTypeLibFile(Optional ByVal VBProjectRef As VBProject = Nothing, _
25+
Optional ByRef ReferenceFixed As Boolean, _
26+
Optional ByRef ReferenceFixedMessage As String)
2527

2628
Dim LibPath As String
2729
Dim LibFile As String
@@ -39,7 +41,10 @@ Public Sub CheckAccUnitTypeLibFile(Optional ByVal VBProjectRef As VBProject = No
3941
ExportFile = Not FileTools.FileExists(LibFile)
4042
If Not ExportFile Then
4143
If Not CheckAccUnitVersion(LibFile) Then
44+
ReferenceFixedMessage = ReferenceFixedMessage & vbNewLine & "New AccUnit dll version exists (please export form add-in)"
45+
On Error Resume Next
4246
RemoveAccUnitTlbReference VBProjectRef
47+
On Error GoTo 0
4348
ExportFile = True
4449
End If
4550
End If
@@ -53,6 +58,11 @@ On Error Resume Next
5358
CheckMissingReference VBProjectRef, ReferenceFixed
5459

5560
ReferenceFixed = ReferenceFixed Or FileFixed
61+
If Len(ReferenceFixedMessage) > 0 Then
62+
If Left(ReferenceFixedMessage, 2) = vbNewLine Then
63+
ReferenceFixedMessage = Mid(ReferenceFixedMessage, 3)
64+
End If
65+
End If
5666

5767
End Sub
5868

excel-add-in/AccUnitLoader.xlam

2.92 KB
Binary file not shown.

excel-add-in/source/AccUnitLoaderForm.frm

Lines changed: 13 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
VERSION 5.00
22
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} AccUnitLoaderForm
33
Caption = "ACLib - AccUnit Loader"
4-
ClientHeight = 4470
5-
ClientLeft = 120
6-
ClientTop = 465
7-
ClientWidth = 9375
4+
ClientHeight = 4473
5+
ClientLeft = 119
6+
ClientTop = 462
7+
ClientWidth = 9373
88
OleObjectBlob = "AccUnitLoaderForm.frx":0000
9-
StartUpPosition = 2 'Bildschirmmitte
9+
StartUpPosition = 2 'CenterScreen
1010
End
1111
Attribute VB_Name = "AccUnitLoaderForm"
1212
Attribute VB_GlobalNameSpace = False
@@ -59,7 +59,14 @@ End Sub
5959

6060
Private Sub UserForm_Initialize()
6161

62-
CheckAccUnitTypeLibFile CodeVBProject
62+
Dim ReferenceFixed As Boolean
63+
Dim ReferenceFixedMessage As String
64+
65+
On Error GoTo ErrMissingPath
66+
CheckAccUnitTypeLibFile CodeVBProject, ReferenceFixed, ReferenceFixedMessage
67+
If Len(ReferenceFixedMessage) Then
68+
Me.labInfo.Caption = ReferenceFixedMessage
69+
End If
6370

6471
With CurrentApplication
6572
Me.Caption = .ApplicationTitle & " (Version " & .Version & ")"
@@ -281,8 +288,6 @@ HandleErr:
281288

282289
End Sub
283290

284-
285-
286291
Private Sub cmdUserSettings_Click()
287292
AccUnitUserSettings.Show 1
288293
End Sub
@@ -319,42 +324,3 @@ Private Sub txtAccUnitDllPath_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean
319324
End If
320325

321326
End Sub
322-
323-
Private Sub LoadIconFromAppFiles()
324-
325-
' Dim IconFilePath As String
326-
' Dim IconFileName As String
327-
'
328-
' 'Latebindung, damit ApplicationHandler_AppFile-Klasse nicht vorhanden sein muss
329-
' Dim AppFile As Object ' ... ApplicationHandler_AppFile
330-
'
331-
' If Val(SysCmd(acSysCmdAccessVer)) <= 9 Then 'Abbruch, da Ac00 sonst abstürzt
332-
' Exit Sub
333-
' End If
334-
'
335-
' Set AppFile = CurrentApplication.Extensions(EXTENSION_KEY_APPFILE)
336-
'
337-
' 'Textbox binden
338-
' If Not (AppFile Is Nothing) Then
339-
' IconFileName = ACLibIconFileName
340-
' IconFilePath = CurrentAccUnitConfiguration.ACLibConfig.ACLibConfigDirectory
341-
'
342-
' If Len(ACLibIconFileName) = 0 Then 'nur Temp-Datei erzeugen
343-
' IconFileName = Me.Name & ".ico"
344-
' IconFilePath = TempPath
345-
' End If
346-
'
347-
' IconFilePath = IconFilePath & IconFileName
348-
'
349-
' If Len(Dir$(IconFilePath)) = 0 Then
350-
' If Not AppFile.CreateAppFile(APPFILE_PROPNAME_APPICON, IconFilePath) Then
351-
' Exit Sub
352-
' End If
353-
' End If
354-
'
355-
' WinAPI.Image.SetFormIconFromFile Me, IconFilePath
356-
'
357-
' End If
358-
359-
End Sub
360-
0 Bytes
Binary file not shown.

excel-add-in/source/AccUnitUserSettings.frm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ VERSION 5.00
22
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} AccUnitUserSettings
33
Caption = "ACLib - AccUnit: Settings"
44
ClientHeight = 5572
5-
ClientLeft = 90
6-
ClientTop = 405
7-
ClientWidth = 10620
5+
ClientLeft = 91
6+
ClientTop = 406
7+
ClientWidth = 10612
88
OleObjectBlob = "AccUnitUserSettings.frx":0000
9-
StartUpPosition = 1 'Fenstermitte
9+
StartUpPosition = 1 'CenterOwner
1010
End
1111
Attribute VB_Name = "AccUnitUserSettings"
1212
Attribute VB_GlobalNameSpace = False
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)