Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update form.frm #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
43 changes: 43 additions & 0 deletions form.frm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,49 @@ Private Sub exp_Click()
Set vbp = vb.VBProjects.Item(list.ListIndex + 1)

Dim vc As Object 'VBComponent
' --------- Проверка защиты проекта --------------
If vbp.Protection Then
MsgBox "Проект защищен"
Exit Sub
End If
'-------------------------------------------------
'------- Для избежания появления неорганизованной кучи
'--------добавлена возможность создания новой папки для экспортируемого макроса.
'--------Название папки имеет формат ИмяМакроса_Год_Месяц_День_Час_Минута
'--------(так папки сами упорядочиваются в хронологическом порядке)
If Flag_NewFolder Then ' на форме добавлен чекбокс Flag_NewFolder
If Len(Month(Now)) = 1 Then
cMonth = "0" & Month(Now)
Else
cMonth = Month(Now)
End If
If Len(Day(Now)) = 1 Then
cDay = "0" & Day(Now)
Else
cDay = Day(Now)
End If
If Len(Hour(Now)) = 1 Then
cHour = "0" & Hour(Now)
Else
If Len(Hour(Now)) = 0 Then
cHour = "00" + Hour(Now)
Else
cHour = Hour(Now)
End If
End If
If Len(Minute(Now)) = 1 Then
cMinute = "0" & Minute(Now)
Else
If Len(Minute(Now)) = 0 Then
cMinute = "00" & Minute(Now)
Else
cMinute = Minute(Now)
End If
End If
Path = Path & "\" & vbp.Name & "_" & Year(Now) & "_" & cMonth & "_" & cDay & "__" & cHour & "_" & cMinute
MkDir Path
End If
'-------------------------------------------------
For Each vc In vbp.VBComponents
Dim fileName$
fileName = vc.Name
Expand Down