Skip to content

Commit e71fb60

Browse files
authored
Excel add in - fixed: issue on start without existing config (#33)
* excel-add-in + new lib files (prepare pre release) * Fix: First start without config * optimize user interface
1 parent 92c1b74 commit e71fb60

File tree

12 files changed

+37
-12
lines changed

12 files changed

+37
-12
lines changed

access-add-in/AccUnitLoader.accda

0 Bytes
Binary file not shown.

access-add-in/AccUnitLoader.accda.src/documents.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"Databases": {
88
"SummaryInfo": {
99
"Author": "Josef Pötzl",
10+
"Comments": "Activate AccUnit for Access/VBA",
1011
"Company": "accunit-codelib.net",
1112
"Title": "AccUnit Loader"
1213
}

access-add-in/AccUnitLoader.accda.src/modules/modTypeLibCheck.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Private Const EXTENSION_KEY_APPFILE As String = "AppFile"
2929
Public Property Get DefaultAccUnitLibFolder() As String
3030
Dim FilePath As String
3131
FilePath = CodeVBProject.FileName
32-
FilePath = Left(FilePath, Len(FilePath) - InStrRev(FilePath, "\"))
32+
FilePath = Left(FilePath, InStrRev(FilePath, "\"))
3333
DefaultAccUnitLibFolder = FilePath & "lib"
3434
End Property
3535

access-add-in/AccUnitLoader.accda.src/nav-pane-groups.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"Info": {
33
"Class": "clsDbNavPaneGroup",
4-
"Description": "Navigation Pane Custom Groups",
5-
"Export File Format": 1.1
4+
"Description": "Navigation Pane Custom Groups"
65
},
76
"Items": {
87
"Categories": [

access-add-in/AccUnitLoader.accda.src/tbldefs/ACLib_ConfigTable.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"Name": "ACLib_ConfigTable",
88
"Connect": ";DATABASE=C:\\Users\\poetzl.joposol\\AppData\\Roaming\\AccessCodeLib\\ACLib_Config.accdu",
99
"SourceTableName": "ACLib_ConfigTable",
10-
"Attributes": 1073741824,
11-
"PrimaryKey": "[PropName]"
10+
"Attributes": 1073741824
1211
}
1312
}

access-add-in/AccUnitLoader.accda.src/vcs-options.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Info": {
3-
"AddinVersion": "4.0.23",
3+
"AddinVersion": "4.0.34",
44
"AccessVersion": "16.0 32-bit"
55
},
66
"Options": {
@@ -36,6 +36,7 @@
3636
"FormatSQL": true,
3737
"ForceImportOriginalQuerySQL": false,
3838
"SaveTableSQL": true,
39+
"SplitLayoutFromVBA": false,
3940
"StripPublishOption": true,
4041
"SanitizeColors": 1,
4142
"SanitizeLevel": 2,

excel-add-in/AccUnitLoader.xlam

44.7 KB
Binary file not shown.

excel-add-in/AccUnitLoader_Install.vbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ Function CopyFiles()
8989

9090
End Function
9191

92-
92+
'Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Excel\Add-in Manager

excel-add-in/source/AccUnitLoaderForm.frm

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION 5.00
22
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} AccUnitLoaderForm
33
Caption = "ACLib - AccUnit Loader"
4-
ClientHeight = 3822
4+
ClientHeight = 4473
55
ClientLeft = 119
66
ClientTop = 462
77
ClientWidth = 9373
@@ -65,7 +65,7 @@ Private Sub UserForm_Initialize()
6565
Me.Caption = .ApplicationTitle & " (Version " & .Version & ")"
6666
End With
6767

68-
LoadIconFromAppFiles
68+
' LoadIconFromAppFiles
6969

7070
With CurrentAccUnitConfiguration
7171
On Error GoTo ErrMissingPath
@@ -143,9 +143,11 @@ On Error GoTo HandleErr
143143
.AddMenuItem 11, "Import AccUnit files from directory"
144144
#End If
145145

146+
If ThisWorkbook.CustomDocumentProperties.Count >= 5 Then
146147
.AddMenuItem -2, "", MF_SEPARATOR
147148
.AddMenuItem 21, "Export AccUnit files to directory"
148149
.AddMenuItem 22, "Remove AccUnit files from Add-In file"
150+
End If
149151

150152
.AddMenuItem -3, "", MF_SEPARATOR
151153
.AddMenuItem 31, "Remove test environment incl. test classes"
@@ -160,12 +162,15 @@ On Error GoTo HandleErr
160162
Select Case mnu.OpenMenu(m_OpenMenuMouse_X, m_OpenMenuMouse_Y)
161163
Case 11
162164
ImportAccUnitFiles
165+
SetEnableMode
163166
SuccessMessage = "AccUnit files imported"
164167
Case 21
165168
ExportAccUnitFiles
169+
SetEnableMode
166170
SuccessMessage = "AccUnit files exported"
167171
Case 22
168172
RemoveAccUnitFilesFromAddInStorage
173+
SetEnableMode
169174
SuccessMessage = "AccUnit files removed from Add-In file"
170175
Case 31
171176
RemoveTestEnvironment True
@@ -198,6 +203,22 @@ HandleErr:
198203

199204
End Function
200205

206+
Private Sub cmdExportFilesToFolder_Click()
207+
208+
On Error GoTo HandleErr
209+
210+
ExportAccUnitFiles
211+
ShowSuccessInfo "AccUnit files exported"
212+
213+
ExitHere:
214+
Exit Sub
215+
216+
HandleErr:
217+
ShowErrorHandlerInfo "cmdInsertFactoryModule_Click"
218+
Resume ExitHere
219+
220+
End Sub
221+
201222
Private Sub cmdSelectAccUnitDllPath_Click()
202223

203224
Dim SelectedAccUnitDllPath As String
@@ -231,6 +252,10 @@ Private Sub SetEnableMode()
231252

232253
Me.cmdSetAccUnitTlbReferenz.Enabled = bolPathExists
233254
Me.cmdInsertFactoryModule.Enabled = bolPathExists
255+
With Me.cmdExportFilesToFolder
256+
.Enabled = bolPathExists
257+
.Visible = (ThisWorkbook.CustomDocumentProperties.Count >= 5)
258+
End With
234259

235260
End Sub
236261

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)