diff --git a/access-add-in/AccUnitLoader.accda b/access-add-in/AccUnitLoader.accda index 5922e2d..111f161 100644 Binary files a/access-add-in/AccUnitLoader.accda and b/access-add-in/AccUnitLoader.accda differ diff --git a/access-add-in/source/forms/AccUnitLoaderForm.bas b/access-add-in/source/forms/AccUnitLoaderForm.bas index 8e984aa..9a9f2e9 100644 --- a/access-add-in/source/forms/AccUnitLoaderForm.bas +++ b/access-add-in/source/forms/AccUnitLoaderForm.bas @@ -16,11 +16,11 @@ Begin Form GridY =10 Width =10604 DatasheetFontHeight =11 - ItemSuffix =125 - Left =-28125 - Top =3045 - Right =-10080 - Bottom =15000 + ItemSuffix =128 + Left =4748 + Top =3563 + Right =20888 + Bottom =12773 OnUnload ="[Event Procedure]" RecSrcDt = Begin 0x212b6fd80e9ce340 @@ -107,7 +107,7 @@ Begin Form Begin CommandButton TabStop = NotDefault OverlapFlags =85 - Left =9885 + Left =9908 Top =120 Width =570 Height =495 @@ -157,12 +157,12 @@ Begin Form GroupTable =2 BottomPadding =150 - LayoutCachedLeft =9885 + LayoutCachedLeft =9908 LayoutCachedTop =120 - LayoutCachedWidth =10455 + LayoutCachedWidth =10478 LayoutCachedHeight =615 - ColumnStart =5 - ColumnEnd =5 + ColumnStart =6 + ColumnEnd =6 LayoutGroup =1 GridlineThemeColorIndex =1 GridlineShade =65.0 @@ -174,7 +174,7 @@ Begin Form TextAlign =1 BackStyle =0 IMESentenceMode =3 - Left =2790 + Left =2805 Top =120 Width =7035 Height =495 @@ -188,12 +188,12 @@ Begin Form GroupTable =2 BottomPadding =150 - LayoutCachedLeft =2790 + LayoutCachedLeft =2805 LayoutCachedTop =120 - LayoutCachedWidth =9825 + LayoutCachedWidth =9840 LayoutCachedHeight =615 ColumnStart =2 - ColumnEnd =4 + ColumnEnd =5 LayoutGroup =1 ThemeFontIndex =1 GridlineThemeColorIndex =1 @@ -205,7 +205,7 @@ Begin Form TextAlign =1 Left =120 Top =120 - Width =2610 + Width =2618 Height =495 FontSize =10 Name ="Label5" @@ -214,7 +214,7 @@ Begin Form BottomPadding =150 LayoutCachedLeft =120 LayoutCachedTop =120 - LayoutCachedWidth =2730 + LayoutCachedWidth =2738 LayoutCachedHeight =615 ColumnEnd =1 LayoutGroup =1 @@ -252,8 +252,8 @@ Begin Form Begin CommandButton TabStop = NotDefault OverlapFlags =85 - Left =2790 - Top =1380 + Left =2805 + Top =1395 Width =4980 Height =405 TabIndex =5 @@ -263,10 +263,10 @@ Begin Form GroupTable =2 BottomPadding =150 - LayoutCachedLeft =2790 - LayoutCachedTop =1380 - LayoutCachedWidth =7770 - LayoutCachedHeight =1785 + LayoutCachedLeft =2805 + LayoutCachedTop =1395 + LayoutCachedWidth =7785 + LayoutCachedHeight =1800 PictureCaptionArrangement =5 RowStart =2 RowEnd =2 @@ -281,8 +281,8 @@ Begin Form Begin CommandButton TabStop = NotDefault OverlapFlags =85 - Left =2790 - Top =1965 + Left =2805 + Top =1988 Width =4980 Height =405 TabIndex =6 @@ -292,10 +292,10 @@ Begin Form GroupTable =2 BottomPadding =150 - LayoutCachedLeft =2790 - LayoutCachedTop =1965 - LayoutCachedWidth =7770 - LayoutCachedHeight =2370 + LayoutCachedLeft =2805 + LayoutCachedTop =1988 + LayoutCachedWidth =7785 + LayoutCachedHeight =2393 PictureCaptionArrangement =5 RowStart =3 RowEnd =3 @@ -310,8 +310,8 @@ Begin Form Begin CommandButton TabStop = NotDefault OverlapFlags =85 - Left =2790 - Top =795 + Left =2805 + Top =803 Width =4980 Height =405 TabIndex =4 @@ -321,10 +321,10 @@ Begin Form GroupTable =2 BottomPadding =150 - LayoutCachedLeft =2790 - LayoutCachedTop =795 - LayoutCachedWidth =7770 - LayoutCachedHeight =1200 + LayoutCachedLeft =2805 + LayoutCachedTop =803 + LayoutCachedWidth =7785 + LayoutCachedHeight =1208 PictureCaptionArrangement =5 RowStart =1 RowEnd =1 @@ -338,16 +338,16 @@ Begin Form End Begin EmptyCell Left =120 - Top =795 - Width =2610 + Top =803 + Width =2618 Height =405 Name ="EmptyCell71" GroupTable =2 BottomPadding =150 LayoutCachedLeft =120 - LayoutCachedTop =795 - LayoutCachedWidth =2730 - LayoutCachedHeight =1200 + LayoutCachedTop =803 + LayoutCachedWidth =2738 + LayoutCachedHeight =1208 RowStart =1 RowEnd =1 ColumnEnd =1 @@ -355,36 +355,36 @@ Begin Form GroupTable =2 End Begin EmptyCell - Left =7830 - Top =795 + Left =7845 + Top =803 Width =1995 Height =405 Name ="EmptyCell73" GroupTable =2 BottomPadding =150 - LayoutCachedLeft =7830 - LayoutCachedTop =795 - LayoutCachedWidth =9825 - LayoutCachedHeight =1200 + LayoutCachedLeft =7845 + LayoutCachedTop =803 + LayoutCachedWidth =9840 + LayoutCachedHeight =1208 RowStart =1 RowEnd =1 ColumnStart =4 - ColumnEnd =4 + ColumnEnd =5 LayoutGroup =1 GroupTable =2 End Begin EmptyCell Left =120 - Top =1380 - Width =2610 + Top =1395 + Width =2618 Height =405 Name ="EmptyCell76" GroupTable =2 BottomPadding =150 LayoutCachedLeft =120 - LayoutCachedTop =1380 - LayoutCachedWidth =2730 - LayoutCachedHeight =1785 + LayoutCachedTop =1395 + LayoutCachedWidth =2738 + LayoutCachedHeight =1800 RowStart =2 RowEnd =2 ColumnEnd =1 @@ -392,36 +392,36 @@ Begin Form GroupTable =2 End Begin EmptyCell - Left =7830 - Top =1380 - Width =2625 + Left =7845 + Top =1395 + Width =2633 Height =405 Name ="EmptyCell78" GroupTable =2 BottomPadding =150 - LayoutCachedLeft =7830 - LayoutCachedTop =1380 - LayoutCachedWidth =10455 - LayoutCachedHeight =1785 + LayoutCachedLeft =7845 + LayoutCachedTop =1395 + LayoutCachedWidth =10478 + LayoutCachedHeight =1800 RowStart =2 RowEnd =2 ColumnStart =4 - ColumnEnd =5 + ColumnEnd =6 LayoutGroup =1 GroupTable =2 End Begin EmptyCell Left =120 - Top =1965 - Width =2610 + Top =1988 + Width =2618 Height =405 Name ="EmptyCell81" GroupTable =2 BottomPadding =150 LayoutCachedLeft =120 - LayoutCachedTop =1965 - LayoutCachedWidth =2730 - LayoutCachedHeight =2370 + LayoutCachedTop =1988 + LayoutCachedWidth =2738 + LayoutCachedHeight =2393 RowStart =3 RowEnd =3 ColumnEnd =1 @@ -429,21 +429,21 @@ Begin Form GroupTable =2 End Begin EmptyCell - Left =7830 - Top =1965 + Left =7845 + Top =1988 Width =1995 Height =405 Name ="EmptyCell83" GroupTable =2 BottomPadding =150 - LayoutCachedLeft =7830 - LayoutCachedTop =1965 - LayoutCachedWidth =9825 - LayoutCachedHeight =2370 + LayoutCachedLeft =7845 + LayoutCachedTop =1988 + LayoutCachedWidth =9840 + LayoutCachedHeight =2393 RowStart =3 RowEnd =3 ColumnStart =4 - ColumnEnd =4 + ColumnEnd =5 LayoutGroup =1 GroupTable =2 End @@ -451,8 +451,8 @@ Begin Form TabStop = NotDefault OverlapFlags =85 Left =120 - Top =3300 - Width =5160 + Top =3338 + Width =5175 Height =465 TabIndex =8 Name ="cmdInsertFactoryModule" @@ -462,9 +462,9 @@ Begin Form BottomPadding =150 LayoutCachedLeft =120 - LayoutCachedTop =3300 - LayoutCachedWidth =5280 - LayoutCachedHeight =3765 + LayoutCachedTop =3338 + LayoutCachedWidth =5295 + LayoutCachedHeight =3803 PictureCaptionArrangement =5 RowStart =5 RowEnd =5 @@ -476,48 +476,48 @@ Begin Form GroupTable =2 End Begin EmptyCell - Left =9885 - Top =795 + Left =9908 + Top =803 Width =570 Height =405 Name ="EmptyCell93" GroupTable =2 BottomPadding =150 - LayoutCachedLeft =9885 - LayoutCachedTop =795 - LayoutCachedWidth =10455 - LayoutCachedHeight =1200 + LayoutCachedLeft =9908 + LayoutCachedTop =803 + LayoutCachedWidth =10478 + LayoutCachedHeight =1208 RowStart =1 RowEnd =1 - ColumnStart =5 - ColumnEnd =5 + ColumnStart =6 + ColumnEnd =6 LayoutGroup =1 GroupTable =2 End Begin EmptyCell - Left =9885 - Top =1965 + Left =9908 + Top =1988 Width =570 Height =405 Name ="EmptyCell95" GroupTable =2 BottomPadding =150 - LayoutCachedLeft =9885 - LayoutCachedTop =1965 - LayoutCachedWidth =10455 - LayoutCachedHeight =2370 + LayoutCachedLeft =9908 + LayoutCachedTop =1988 + LayoutCachedWidth =10478 + LayoutCachedHeight =2393 RowStart =3 RowEnd =3 - ColumnStart =5 - ColumnEnd =5 + ColumnStart =6 + ColumnEnd =6 LayoutGroup =1 GroupTable =2 End Begin CommandButton TabStop = NotDefault OverlapFlags =85 - Left =9885 - Top =3300 + Left =9908 + Top =3338 Width =570 Height =465 TabIndex =9 @@ -528,15 +528,15 @@ Begin Form GroupTable =2 BottomPadding =150 - LayoutCachedLeft =9885 - LayoutCachedTop =3300 - LayoutCachedWidth =10455 - LayoutCachedHeight =3765 + LayoutCachedLeft =9908 + LayoutCachedTop =3338 + LayoutCachedWidth =10478 + LayoutCachedHeight =3803 PictureCaptionArrangement =5 RowStart =5 RowEnd =5 - ColumnStart =5 - ColumnEnd =5 + ColumnStart =6 + ColumnEnd =6 LayoutGroup =1 GridlineThemeColorIndex =1 GridlineShade =65.0 @@ -546,8 +546,8 @@ Begin Form Begin CommandButton TabStop = NotDefault OverlapFlags =85 - Left =9885 - Top =2550 + Left =9908 + Top =2580 Width =570 Height =570 TabIndex =7 @@ -596,94 +596,67 @@ Begin Form 0x0000000000000000 End - LayoutCachedLeft =9885 - LayoutCachedTop =2550 - LayoutCachedWidth =10455 - LayoutCachedHeight =3120 + LayoutCachedLeft =9908 + LayoutCachedTop =2580 + LayoutCachedWidth =10478 + LayoutCachedHeight =3150 RowStart =4 RowEnd =4 - ColumnStart =5 - ColumnEnd =5 + ColumnStart =6 + ColumnEnd =6 LayoutGroup =1 GridlineThemeColorIndex =1 GridlineShade =65.0 GroupTable =2 - Begin - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =735 - Top =2550 - Width =9090 - Height =570 - Name ="labInfo" - GroupTable =2 - BottomPadding =150 - LayoutCachedLeft =735 - LayoutCachedTop =2550 - LayoutCachedWidth =9825 - LayoutCachedHeight =3120 - RowStart =4 - RowEnd =4 - ColumnStart =1 - ColumnEnd =4 - LayoutGroup =1 - ThemeFontIndex =1 - ForeThemeColorIndex =4 - GridlineThemeColorIndex =1 - GridlineShade =65.0 - GroupTable =2 - End - End End Begin EmptyCell Left =120 - Top =2550 + Top =2580 Width =562 Height =570 Name ="EmptyCell113" GroupTable =2 BottomPadding =150 LayoutCachedLeft =120 - LayoutCachedTop =2550 + LayoutCachedTop =2580 LayoutCachedWidth =682 - LayoutCachedHeight =3120 + LayoutCachedHeight =3150 RowStart =4 RowEnd =4 LayoutGroup =1 GroupTable =2 End Begin EmptyCell - Left =7830 - Top =3300 + Left =7845 + Top =3338 Width =1995 Height =465 Name ="EmptyCell119" GroupTable =2 BottomPadding =150 - LayoutCachedLeft =7830 - LayoutCachedTop =3300 - LayoutCachedWidth =9825 - LayoutCachedHeight =3765 + LayoutCachedLeft =7845 + LayoutCachedTop =3338 + LayoutCachedWidth =9840 + LayoutCachedHeight =3803 RowStart =5 RowEnd =5 ColumnStart =4 - ColumnEnd =4 + ColumnEnd =5 LayoutGroup =1 GroupTable =2 End Begin EmptyCell - Left =5340 - Top =3300 + Left =5355 + Top =3338 Width =2430 Height =465 Name ="EmptyCell121" GroupTable =2 BottomPadding =150 - LayoutCachedLeft =5340 - LayoutCachedTop =3300 - LayoutCachedWidth =7770 - LayoutCachedHeight =3765 + LayoutCachedLeft =5355 + LayoutCachedTop =3338 + LayoutCachedWidth =7785 + LayoutCachedHeight =3803 RowStart =5 RowEnd =5 ColumnStart =3 @@ -691,6 +664,50 @@ Begin Form LayoutGroup =1 GroupTable =2 End + Begin Label + OverlapFlags =85 + TextAlign =2 + Left =743 + Top =2580 + Width =8887 + Height =570 + Name ="labInfo" + GroupTable =2 + BottomPadding =150 + LayoutCachedLeft =743 + LayoutCachedTop =2580 + LayoutCachedWidth =9630 + LayoutCachedHeight =3150 + RowStart =4 + RowEnd =4 + ColumnStart =1 + ColumnEnd =4 + LayoutGroup =1 + ThemeFontIndex =1 + ForeThemeColorIndex =4 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + GroupTable =2 + End + Begin EmptyCell + Left =9690 + Top =2580 + Width =150 + Height =570 + Name ="EmptyCell127" + GroupTable =2 + BottomPadding =150 + LayoutCachedLeft =9690 + LayoutCachedTop =2580 + LayoutCachedWidth =9840 + LayoutCachedHeight =3150 + RowStart =4 + RowEnd =4 + ColumnStart =5 + ColumnEnd =5 + LayoutGroup =1 + GroupTable =2 + End End End End diff --git a/access-add-in/source/forms/AccUnitLoaderForm.cls b/access-add-in/source/forms/AccUnitLoaderForm.cls index 9813a28..221e9ac 100644 --- a/access-add-in/source/forms/AccUnitLoaderForm.cls +++ b/access-add-in/source/forms/AccUnitLoaderForm.cls @@ -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 @@ -230,9 +237,7 @@ Private Sub Form_Load() LoadIconFromAppFiles With CurrentAccUnitConfiguration -On Error GoTo ErrMissingPath Me.txtAccUnitDllPath.Value = .AccUnitDllPath -On Error GoTo 0 End With SetEnableMode @@ -240,6 +245,7 @@ On Error GoTo 0 Exit Sub ErrMissingPath: + ShowErrorHandlerInfo Err.Description Resume Next End Sub diff --git a/access-add-in/source/modules/_config_Application.bas b/access-add-in/source/modules/_config_Application.bas index 820622e..d158b1a 100644 --- a/access-add-in/source/modules/_config_Application.bas +++ b/access-add-in/source/modules/_config_Application.bas @@ -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" diff --git a/access-add-in/source/modules/modTypeLibCheck.bas b/access-add-in/source/modules/modTypeLibCheck.bas index 9c44c05..0f316eb 100644 --- a/access-add-in/source/modules/modTypeLibCheck.bas +++ b/access-add-in/source/modules/modTypeLibCheck.bas @@ -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 @@ -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 @@ -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 diff --git a/excel-add-in/AccUnitLoader.xlam b/excel-add-in/AccUnitLoader.xlam index ecc9b46..7d6d5b3 100644 Binary files a/excel-add-in/AccUnitLoader.xlam and b/excel-add-in/AccUnitLoader.xlam differ diff --git a/excel-add-in/source/AccUnitLoaderForm.frm b/excel-add-in/source/AccUnitLoaderForm.frm index a6119ca..9d52711 100644 --- a/excel-add-in/source/AccUnitLoaderForm.frm +++ b/excel-add-in/source/AccUnitLoaderForm.frm @@ -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 @@ -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 & ")" @@ -281,8 +288,6 @@ HandleErr: End Sub - - Private Sub cmdUserSettings_Click() AccUnitUserSettings.Show 1 End Sub @@ -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 - diff --git a/excel-add-in/source/AccUnitLoaderForm.frx b/excel-add-in/source/AccUnitLoaderForm.frx index 9814b61..ce31640 100644 Binary files a/excel-add-in/source/AccUnitLoaderForm.frx and b/excel-add-in/source/AccUnitLoaderForm.frx differ diff --git a/excel-add-in/source/AccUnitUserSettings.frm b/excel-add-in/source/AccUnitUserSettings.frm index c344d3c..1576156 100644 --- a/excel-add-in/source/AccUnitUserSettings.frm +++ b/excel-add-in/source/AccUnitUserSettings.frm @@ -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 diff --git a/excel-add-in/source/AccUnitUserSettings.frx b/excel-add-in/source/AccUnitUserSettings.frx index 4c051f9..842e2f7 100644 Binary files a/excel-add-in/source/AccUnitUserSettings.frx and b/excel-add-in/source/AccUnitUserSettings.frx differ diff --git a/excel-add-in/source/config_Application.bas b/excel-add-in/source/config_Application.bas index fb45fa3..cbdf348 100644 --- a/excel-add-in/source/config_Application.bas +++ b/excel-add-in/source/config_Application.bas @@ -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" diff --git a/excel-add-in/source/modTypeLibCheck.bas b/excel-add-in/source/modTypeLibCheck.bas index 9a82de1..865f54b 100644 --- a/excel-add-in/source/modTypeLibCheck.bas +++ b/excel-add-in/source/modTypeLibCheck.bas @@ -33,13 +33,19 @@ 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 @@ -47,7 +53,10 @@ Public Sub CheckAccUnitTypeLibFile(ByVal VBProjectRef As VBProject, Optional ByR 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 @@ -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