Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified access-add-in/AccUnitLoader.accda
Binary file not shown.
319 changes: 168 additions & 151 deletions access-add-in/source/forms/AccUnitLoaderForm.bas

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions access-add-in/source/forms/AccUnitLoaderForm.cls
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,14 @@ End Sub

Private Sub Form_Load()

CheckAccUnitTypeLibFile CodeVBProject
Dim ReferenceFixed As Boolean
Dim ReferenceFixedMessage As String

On Error GoTo ErrMissingPath
CheckAccUnitTypeLibFile CodeVBProject, ReferenceFixed, ReferenceFixedMessage
If Len(ReferenceFixedMessage) Then
Me.labInfo.Caption = ReferenceFixedMessage
End If

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

With CurrentAccUnitConfiguration
On Error GoTo ErrMissingPath
Me.txtAccUnitDllPath.Value = .AccUnitDllPath
On Error GoTo 0
End With

SetEnableMode

Exit Sub

ErrMissingPath:
ShowErrorHandlerInfo Err.Description
Resume Next

End Sub
Expand Down
2 changes: 1 addition & 1 deletion access-add-in/source/modules/_config_Application.bas
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Option Compare Text
Option Explicit

'Version number
Private Const APPLICATION_VERSION As String = "0.9.401.240323"
Private Const APPLICATION_VERSION As String = "0.9.402.240323"

Private Const APPLICATION_NAME As String = "ACLib AccUnit Loader"
Private Const APPLICATION_FULLNAME As String = "Access Code Library - AccUnit Loader"
Expand Down
12 changes: 11 additions & 1 deletion access-add-in/source/modules/modTypeLibCheck.bas
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ Public Property Get DefaultAccUnitLibFolder() As String
DefaultAccUnitLibFolder = FilePath & "lib"
End Property

Public Sub CheckAccUnitTypeLibFile(Optional ByVal VBProjectRef As VBProject = Nothing, Optional ByRef ReferenceFixed As Boolean)
Public Sub CheckAccUnitTypeLibFile(Optional ByVal VBProjectRef As VBProject = Nothing, _
Optional ByRef ReferenceFixed As Boolean, _
Optional ByRef ReferenceFixedMessage As String)

Dim LibPath As String
Dim LibFile As String
Expand All @@ -39,7 +41,10 @@ Public Sub CheckAccUnitTypeLibFile(Optional ByVal VBProjectRef As VBProject = No
ExportFile = Not FileTools.FileExists(LibFile)
If Not ExportFile Then
If Not CheckAccUnitVersion(LibFile) Then
ReferenceFixedMessage = ReferenceFixedMessage & vbNewLine & "New AccUnit dll version exists (please export form add-in)"
On Error Resume Next
RemoveAccUnitTlbReference VBProjectRef
On Error GoTo 0
ExportFile = True
End If
End If
Expand All @@ -53,6 +58,11 @@ On Error Resume Next
CheckMissingReference VBProjectRef, ReferenceFixed

ReferenceFixed = ReferenceFixed Or FileFixed
If Len(ReferenceFixedMessage) > 0 Then
If Left(ReferenceFixedMessage, 2) = vbNewLine Then
ReferenceFixedMessage = Mid(ReferenceFixedMessage, 3)
End If
End If

End Sub

Expand Down
Binary file modified excel-add-in/AccUnitLoader.xlam
Binary file not shown.
60 changes: 13 additions & 47 deletions excel-add-in/source/AccUnitLoaderForm.frm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} AccUnitLoaderForm
Caption = "ACLib - AccUnit Loader"
ClientHeight = 4470
ClientLeft = 120
ClientTop = 465
ClientWidth = 9375
ClientHeight = 4473
ClientLeft = 119
ClientTop = 462
ClientWidth = 9373
OleObjectBlob = "AccUnitLoaderForm.frx":0000
StartUpPosition = 2 'Bildschirmmitte
StartUpPosition = 2 'CenterScreen
End
Attribute VB_Name = "AccUnitLoaderForm"
Attribute VB_GlobalNameSpace = False
Expand Down Expand Up @@ -59,7 +59,14 @@ End Sub

Private Sub UserForm_Initialize()

CheckAccUnitTypeLibFile CodeVBProject
Dim ReferenceFixed As Boolean
Dim ReferenceFixedMessage As String

On Error GoTo ErrMissingPath
CheckAccUnitTypeLibFile CodeVBProject, ReferenceFixed, ReferenceFixedMessage
If Len(ReferenceFixedMessage) Then
Me.labInfo.Caption = ReferenceFixedMessage
End If

With CurrentApplication
Me.Caption = .ApplicationTitle & " (Version " & .Version & ")"
Expand Down Expand Up @@ -281,8 +288,6 @@ HandleErr:

End Sub



Private Sub cmdUserSettings_Click()
AccUnitUserSettings.Show 1
End Sub
Expand Down Expand Up @@ -319,42 +324,3 @@ Private Sub txtAccUnitDllPath_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean
End If

End Sub

Private Sub LoadIconFromAppFiles()

' Dim IconFilePath As String
' Dim IconFileName As String
'
' 'Latebindung, damit ApplicationHandler_AppFile-Klasse nicht vorhanden sein muss
' Dim AppFile As Object ' ... ApplicationHandler_AppFile
'
' If Val(SysCmd(acSysCmdAccessVer)) <= 9 Then 'Abbruch, da Ac00 sonst abst�rzt
' Exit Sub
' End If
'
' Set AppFile = CurrentApplication.Extensions(EXTENSION_KEY_APPFILE)
'
' 'Textbox binden
' If Not (AppFile Is Nothing) Then
' IconFileName = ACLibIconFileName
' IconFilePath = CurrentAccUnitConfiguration.ACLibConfig.ACLibConfigDirectory
'
' If Len(ACLibIconFileName) = 0 Then 'nur Temp-Datei erzeugen
' IconFileName = Me.Name & ".ico"
' IconFilePath = TempPath
' End If
'
' IconFilePath = IconFilePath & IconFileName
'
' If Len(Dir$(IconFilePath)) = 0 Then
' If Not AppFile.CreateAppFile(APPFILE_PROPNAME_APPICON, IconFilePath) Then
' Exit Sub
' End If
' End If
'
' WinAPI.Image.SetFormIconFromFile Me, IconFilePath
'
' End If

End Sub

Binary file modified excel-add-in/source/AccUnitLoaderForm.frx
Binary file not shown.
8 changes: 4 additions & 4 deletions excel-add-in/source/AccUnitUserSettings.frm
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} AccUnitUserSettings
Caption = "ACLib - AccUnit: Settings"
ClientHeight = 5572
ClientLeft = 90
ClientTop = 405
ClientWidth = 10620
ClientLeft = 91
ClientTop = 406
ClientWidth = 10612
OleObjectBlob = "AccUnitUserSettings.frx":0000
StartUpPosition = 1 'Fenstermitte
StartUpPosition = 1 'CenterOwner
End
Attribute VB_Name = "AccUnitUserSettings"
Attribute VB_GlobalNameSpace = False
Expand Down
Binary file modified excel-add-in/source/AccUnitUserSettings.frx
Binary file not shown.
2 changes: 1 addition & 1 deletion excel-add-in/source/config_Application.bas
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Option Explicit
Option Private Module

'Version number
Private Const APPLICATION_VERSION As String = "0.9.400.20240320"
Private Const APPLICATION_VERSION As String = "0.9.402.20240323"

Private Const APPLICATION_NAME As String = "ACLib AccUnit Loader"
Private Const APPLICATION_FULLNAME As String = "Access Code Library - AccUnit Loader"
Expand Down
20 changes: 15 additions & 5 deletions excel-add-in/source/modTypeLibCheck.bas
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,30 @@ Public Property Get DefaultAccUnitLibFolder() As String
DefaultAccUnitLibFolder = FilePath & "lib"
End Property

Public Sub CheckAccUnitTypeLibFile(ByVal VBProjectRef As VBProject, Optional ByRef ReferenceFixed As Boolean)
Public Sub CheckAccUnitTypeLibFile(Optional ByVal VBProjectRef As VBProject = Nothing, _
Optional ByRef ReferenceFixed As Boolean, _
Optional ByRef ReferenceFixedMessage As String)

Dim LibPath As String
Dim LibFile As String
Dim ExportFile As Boolean
Dim FileFixed As Boolean

If VBProjectRef Is Nothing Then
Set VBProjectRef = CodeVBProject
End If

LibPath = GetAccUnitLibPath(True)
LibFile = LibPath & ACCUNIT_TYPELIB_FILE
FileTools.CreateDirectory LibPath

ExportFile = Not FileTools.FileExists(LibFile)
If Not ExportFile Then
If Not CheckAccUnitVersion(LibFile) Then
ReferenceFixedMessage = ReferenceFixedMessage & vbNewLine & "New AccUnit dll version exists (please export form add-in)"
On Error Resume Next
RemoveAccUnitTlbReference VBProjectRef
On Error GoTo 0
ExportFile = True
End If
End If
Expand All @@ -58,13 +67,14 @@ Public Sub CheckAccUnitTypeLibFile(ByVal VBProjectRef As VBProject, Optional ByR
End If

On Error Resume Next
If VBProjectRef Is Nothing Then
Set VBProjectRef = CodeVBProject
End If

CheckMissingReference VBProjectRef, ReferenceFixed

ReferenceFixed = ReferenceFixed Or FileFixed
If Len(ReferenceFixedMessage) > 0 Then
If Left(ReferenceFixedMessage, 2) = vbNewLine Then
ReferenceFixedMessage = Mid(ReferenceFixedMessage, 3)
End If
End If

End Sub

Expand Down