11VERSION 5.00
22Begin {C62A69F0-16 DC-11 CE-9 E98-00 AA00574A4F} 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
7171On 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
199204End 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+
201222Private 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
235260End Sub
236261
0 commit comments