├── .gitattributes ├── .gitignore ├── Addin_MacroTools_ENG.xlsb ├── Addin_MacroTools_RUS.xlsb ├── LICENSE ├── README.md └── scripts ├── Class_Modules ├── CAnchor.cls ├── CAnchors.cls ├── CTextBox_ContextMenu.cls ├── EventListenerEmitter.cls ├── EventListenerItem.cls ├── LogRecorder.cls ├── VBECommandHandler.cls ├── clsEditOpenXML.cls └── ЭтаКнига.cls ├── Modules ├── AA_SwapEgual.bas ├── AB_AlphabetizeProcedure.bas ├── A_RibbonCallbacks.bas ├── B_CreateMenus.bas ├── C_Const.bas ├── C_PublicFunctions.bas ├── D_OnAction.bas ├── E_AddEnum.bas ├── F_AddInInstall.bas ├── G_AddCodeViewForm.bas ├── H_AddLegend.bas ├── I_StatisticShape.bas ├── I_StatisticVBAProj.bas ├── J_EditCode.bas ├── K_AddNumbersLine.bas ├── L_IndentRoutine.bas ├── M_MoveControl.bas ├── N_ObfMainNew.bas ├── N_ObfParserVBA.bas ├── N_Obfuscation.bas ├── O_XML.bas ├── P_UnProtected.bas ├── Q_InToFile.bas ├── R_Update.bas ├── S_ModuleCommander.bas ├── T_AddCommentsProc.bas ├── U_UpperAndLowerCase.bas ├── V_BlackAndWiteTheme.bas ├── W_RegExp.bas ├── X_InfoFile.bas ├── Y_Options.bas ├── ZA_ParserString.bas ├── ZB_DeleteLinksFile.bas ├── ZC_HotKey.bas ├── Z_Clipboard.bas └── Z_TabbedMDI.bas └── UserForms ├── AddCodeView.frm ├── AddEditCode.frm ├── AddOptions.frm ├── AddStatistic.frm ├── BilderFormat.frm ├── BilderProcedure.frm ├── CharsMonitor.frm ├── HiddenModule.frm ├── InfoFile.frm ├── InfoFile2.frm ├── InsertIconUserForm.frm ├── ModuleCommander.frm ├── ModuleTODO.frm ├── MsgBoxGenerator.frm ├── ObfuscationCode.frm ├── OptionsCodeFormat.frm ├── ProtectedSheets.frm ├── RegExpTemplateManager.frm ├── SettingsAddCommentsProc.frm ├── VariableUnUsed.frm └── VersionSistemControls.frm /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /scripts/**/*.frx 2 | /scripts/*.frx -------------------------------------------------------------------------------- /Addin_MacroTools_ENG.xlsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/Addin_MacroTools_ENG.xlsb -------------------------------------------------------------------------------- /Addin_MacroTools_RUS.xlsb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/Addin_MacroTools_RUS.xlsb -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 VBATools 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MacroToolsVBA https://vbatools.ru/ 2 | **Macro Tools VBA** - a tool for automating the development of macros in the Visual Basic Editor (VBE) MS Excel and Word 3 | Add-in 4 | 5 | **DONUT:** https://www.donationalerts.com/r/vbatools 6 | 7 | **Home page add-in:** https://vbatools.ru/macro-tools-vba-addin-excel/ 8 | 9 | ![alt tag](https://vbatools.ru/wp-content/uploads/2019/10/main-macro-tools-vba2.gif "Use Macro Tools VBA Example") 10 | 11 | ## Main functions: 12 | - removing passwords of VBA projects, workbooks and worksheets in Excel 13 | - automatic code formatting, placement and removal of the indentation of code 14 | - automatic numbering of lines of code 15 | - micro adjustment of elements in forms 16 | - renaming items in the forms along with the code 17 | - the LOG entry macro execution 18 | - obfuscation of code in the VBA project 19 | - to give you detailed statistics on the project (the number of lines of code, procedures, elements, forms, etc.) 20 | - has its base blanks code (Code Library), for typical cases with fast insert in the new macros 21 | - the ability to supplement the Code-Library with your own code blanks 22 | - automatic unpacking and packing of the Excel file 23 | - VBA Project Manager VBA Project Management 24 | - file version control 25 | - analyzing VBA code deleting unused variables A 26 | - tool for hiding VBA project modules 27 | - changing the theme of the VBE code editor - dark and light 28 | - hot keys module https://github.com/vbatools/MacroToolsVBAHotKeys 29 | 30 | ## Zen Macro Tools VBA: 31 | - do not use third-party dlls, 32 | - the add-in should only use VBA MS Office 33 | - installation that does not require the user to have administrator rights 34 | - open source 35 | - work in all versions of Excel and Word-32 and 64-bit 36 | 37 | ## YouTube - use tools add-in 38 | https://www.youtube.com/playlist?list=PLYcZpZtN5HUMpReyXlF2Au2BV1Hk0l_hd 39 | [![Use Tools Macro Tools VBA](https://vbatools.ru/wp-content/uploads/2020/01/macrotoolsvbadocument.gif)](https://www.youtube.com/playlist?list=PLYcZpZtN5HUMpReyXlF2Au2BV1Hk0l_hd) 40 | -------------------------------------------------------------------------------- /scripts/Class_Modules/CAnchor.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "CAnchor" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = False 9 | Attribute VB_Exposed = False 10 | '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 11 | '* Module : CAnchor 12 | '* Created : 15-09-2019 15:53 13 | '* Author : VBATools 14 | '* Contacts : http://vbatools.ru/ https://vk.com/vbatools 15 | '* Copyright : VBATools.ru 16 | '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 17 | 18 | Option Explicit 19 | Public cnt As MSForms.control 20 | Public AnchorStyle As enumAnchorStyles 21 | Public MinimumLeft As Single 22 | Public MinimumTop As Single 23 | Public MinimumWidth As Single 24 | Public MinimumHeight As Single 25 | Public OrigLeft As Single 26 | Public OrigTop As Single 27 | Public OrigWidth As Single 28 | Public OrigHeight As Single 29 | -------------------------------------------------------------------------------- /scripts/Class_Modules/CAnchors.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Class_Modules/CAnchors.cls -------------------------------------------------------------------------------- /scripts/Class_Modules/CTextBox_ContextMenu.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Class_Modules/CTextBox_ContextMenu.cls -------------------------------------------------------------------------------- /scripts/Class_Modules/EventListenerEmitter.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "EventListenerEmitter" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = False 9 | Attribute VB_Exposed = False 10 | Option Explicit 11 | Option Compare Text 12 | 13 | 'ARRAY OF ALL THE DIFFERENT EVENT ListenerS FOR EVERY USERFORM CONTROL +FORM ITSELF 14 | Private EventList() As New EventListenerItem 15 | 16 | 'ALL CURRENT POSSIBLE EVENTS THAT CAN BE EMITTED. NOTE, EMITTEDEVENT IS SENT FOR ALL EVENTS! 17 | Public Event EmittedEvent(ByRef control As Object, ByVal EventName As EmittedEvent, ByRef EventParameters As Scripting.Dictionary) 18 | Public Event Click(ByRef control As Object) 19 | Public Event DblClick(ByRef control As Object, ByRef Cancel As MSForms.ReturnBoolean) 20 | Public Event KeyUp(ByRef control As Object, ByRef KeyCode As MSForms.ReturnInteger, ByRef Shift As Integer) 21 | Public Event KeyDown(ByRef control As Object, ByRef KeyCode As MSForms.ReturnInteger, ByRef Shift As Integer) 22 | Public Event MouseOver(ByRef control As Object) 23 | Public Event MouseOut(ByRef control As Object) 24 | Public Event MouseMove(ByRef control As Object, ByRef Shift As Integer, ByRef X As Single, ByRef Y As Single) 25 | Public Event Focus(ByRef control As Object) 26 | Public Event Blur(ByRef control As Object) 27 | Public Event Change(ByRef control As Object) 28 | 29 | Public Enum EmittedEvent 30 | Click 31 | DoubleClick 32 | MouseMove 33 | MouseOut 34 | MouseOver 35 | MouseDown 36 | MouseUp 37 | KeyUp 38 | KeyDown 39 | Focus 40 | Blur 41 | End Enum 42 | 43 | '*********************************************************************************** 44 | ' PUBLIC METHODS 45 | '*********************************************************************************** 46 | 47 | 'CALLED BY EVENTLISTENERCOLLECTION CLASS - MAIN ENTRYWAY OF EMITTING ALL EVENTS 48 | Public Sub EmitEvent(ByRef control As Object, ByVal EventName As EmittedEvent, Optional ByRef EventParameters As Scripting.Dictionary) 49 | 50 | 'EVENT RAISED FOR ALL EVENTS. THIS IS A WAY FOR THE USER TO COLLECT FROM A SINGLE LOCATION. 51 | RaiseEvent EmittedEvent(control, EventName, EventParameters) 52 | 53 | 'SPECIFIC EVENTS PER OBJECT-TYPE 54 | Select Case EventName 55 | 56 | Case Click 57 | RaiseEvent Click(control) 58 | 59 | Case DoubleClick 60 | RaiseEvent DblClick(control, EventParameters("Cancel")) 61 | 62 | Case KeyUp 63 | RaiseEvent KeyUp(control, EventParameters("KeyCode"), EventParameters("Shift")) 64 | 65 | Case KeyDown 66 | RaiseEvent KeyDown(control, EventParameters("KeyCode"), EventParameters("Shift")) 67 | 68 | Case MouseOver 69 | RaiseEvent MouseOver(control) 70 | 71 | Case MouseOut 72 | RaiseEvent MouseOut(control) 73 | 74 | Case Focus 75 | RaiseEvent Focus(control) 76 | 77 | Case Blur 78 | RaiseEvent Blur(control) 79 | 80 | Case MouseMove 81 | RaiseEvent MouseMove(control, EventParameters("Shift"), EventParameters("X"), EventParameters("Y")) 82 | 83 | End Select 84 | 85 | End Sub 86 | 87 | 'MUST CALL THIS IF YOU WANT TO programmatically SET CONTROL! OTHERWISE, EVENT'S WILL BE OFF! 88 | Public Sub SetFocusToControl(ByRef control As Object) 89 | 90 | 'If the user was to set focus through VBA then this code will fall apart considering 91 | 'it is unaware of that event occurring. 92 | If Not control Is Nothing Then 93 | control.setFocus 94 | EmitEvent control, Focus 95 | End If 96 | 97 | End Sub 98 | 99 | 'ADD EVENT ListenerS ON SPECIFIC CONTROLS - ALSO CALLED BY AddEventListenerAll 100 | Public Sub AddEventListener(ByRef control As Object) 101 | 102 | 'Events are stored in a private EventListenerItem array 103 | If IsArrayEmpty(EventList) Then 104 | ReDim EventList(0 To 0) 105 | Else 106 | ReDim Preserve EventList(0 To UBound(EventList) + 1) 107 | End If 108 | 109 | 'CALL AddEventListener IN EventListenerItem. THIS IS KEPT IN 110 | EventList(UBound(EventList)).AddEventListener control, Me 111 | 112 | End Sub 113 | 114 | 'ADD EVENT Listener TO ALL CONTROLS INCLUDING THE FORM 115 | Public Sub AddEventListenerAll(ByRef Form As Object) 116 | 117 | AddEventListener Form 118 | 119 | Dim Ctrl As MSForms.control 120 | For Each Ctrl In Form.Controls 121 | AddEventListener Ctrl 122 | Next Ctrl 123 | 124 | End Sub 125 | 126 | Private Function IsArrayEmpty(Arr As Variant) As Boolean 127 | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 128 | ' CPEARSON: http://www.cpearson.com/excel/VBAArrays.htm 129 | ' This function tests whether the array is empty (unallocated). Returns TRUE or FALSE. 130 | ' 131 | ' The VBA IsArray function indicates whether a variable is an array, but it does not 132 | ' distinguish between allocated and unallocated arrays. It will return TRUE for both 133 | ' allocated and unallocated arrays. This function tests whether the array has actually 134 | ' been allocated. 135 | ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 136 | 137 | Err.Clear 138 | On Error Resume Next 139 | If IsArray(Arr) = False Then 140 | ' we weren't passed an array, return True 141 | IsArrayEmpty = True 142 | End If 143 | 144 | ' Attempt to get the UBound of the array. If the array is 145 | ' unallocated, an error will occur. 146 | Dim ub As Long 147 | ub = UBound(Arr, 1) 148 | If (Err.Number <> 0) Then 149 | IsArrayEmpty = True 150 | Else 151 | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 152 | ' On rare occasion, under circumstances I cannot reliably replicate, Err.Number 153 | ' will be 0 for an unallocated, empty array. On these occasions, LBound is 0 and 154 | ' UBound is -1. To accommodate the weird behavior, test to see if LB > UB. 155 | ' If so, the array is not allocated. 156 | '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 157 | Err.Clear 158 | Dim LB As Long 159 | LB = LBound(Arr) 160 | If LB > ub Then 161 | IsArrayEmpty = True 162 | Else 163 | IsArrayEmpty = False 164 | End If 165 | End If 166 | 167 | End Function 168 | 169 | 170 | -------------------------------------------------------------------------------- /scripts/Class_Modules/EventListenerItem.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Class_Modules/EventListenerItem.cls -------------------------------------------------------------------------------- /scripts/Class_Modules/LogRecorder.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Class_Modules/LogRecorder.cls -------------------------------------------------------------------------------- /scripts/Class_Modules/VBECommandHandler.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Class_Modules/VBECommandHandler.cls -------------------------------------------------------------------------------- /scripts/Class_Modules/clsEditOpenXML.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Class_Modules/clsEditOpenXML.cls -------------------------------------------------------------------------------- /scripts/Class_Modules/ЭтаКнига.cls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Class_Modules/ЭтаКнига.cls -------------------------------------------------------------------------------- /scripts/Modules/AA_SwapEgual.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/AA_SwapEgual.bas -------------------------------------------------------------------------------- /scripts/Modules/AB_AlphabetizeProcedure.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/AB_AlphabetizeProcedure.bas -------------------------------------------------------------------------------- /scripts/Modules/A_RibbonCallbacks.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/A_RibbonCallbacks.bas -------------------------------------------------------------------------------- /scripts/Modules/B_CreateMenus.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/B_CreateMenus.bas -------------------------------------------------------------------------------- /scripts/Modules/C_Const.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/C_Const.bas -------------------------------------------------------------------------------- /scripts/Modules/C_PublicFunctions.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/C_PublicFunctions.bas -------------------------------------------------------------------------------- /scripts/Modules/D_OnAction.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/D_OnAction.bas -------------------------------------------------------------------------------- /scripts/Modules/E_AddEnum.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/E_AddEnum.bas -------------------------------------------------------------------------------- /scripts/Modules/F_AddInInstall.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/F_AddInInstall.bas -------------------------------------------------------------------------------- /scripts/Modules/G_AddCodeViewForm.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/G_AddCodeViewForm.bas -------------------------------------------------------------------------------- /scripts/Modules/H_AddLegend.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/H_AddLegend.bas -------------------------------------------------------------------------------- /scripts/Modules/I_StatisticShape.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/I_StatisticShape.bas -------------------------------------------------------------------------------- /scripts/Modules/I_StatisticVBAProj.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/I_StatisticVBAProj.bas -------------------------------------------------------------------------------- /scripts/Modules/J_EditCode.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/J_EditCode.bas -------------------------------------------------------------------------------- /scripts/Modules/K_AddNumbersLine.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/K_AddNumbersLine.bas -------------------------------------------------------------------------------- /scripts/Modules/L_IndentRoutine.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/L_IndentRoutine.bas -------------------------------------------------------------------------------- /scripts/Modules/M_MoveControl.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/M_MoveControl.bas -------------------------------------------------------------------------------- /scripts/Modules/N_ObfMainNew.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/N_ObfMainNew.bas -------------------------------------------------------------------------------- /scripts/Modules/N_ObfParserVBA.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/N_ObfParserVBA.bas -------------------------------------------------------------------------------- /scripts/Modules/N_Obfuscation.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/N_Obfuscation.bas -------------------------------------------------------------------------------- /scripts/Modules/O_XML.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/O_XML.bas -------------------------------------------------------------------------------- /scripts/Modules/P_UnProtected.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/P_UnProtected.bas -------------------------------------------------------------------------------- /scripts/Modules/Q_InToFile.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/Q_InToFile.bas -------------------------------------------------------------------------------- /scripts/Modules/R_Update.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/R_Update.bas -------------------------------------------------------------------------------- /scripts/Modules/S_ModuleCommander.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/S_ModuleCommander.bas -------------------------------------------------------------------------------- /scripts/Modules/T_AddCommentsProc.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/T_AddCommentsProc.bas -------------------------------------------------------------------------------- /scripts/Modules/U_UpperAndLowerCase.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/U_UpperAndLowerCase.bas -------------------------------------------------------------------------------- /scripts/Modules/V_BlackAndWiteTheme.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/V_BlackAndWiteTheme.bas -------------------------------------------------------------------------------- /scripts/Modules/W_RegExp.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/W_RegExp.bas -------------------------------------------------------------------------------- /scripts/Modules/X_InfoFile.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/X_InfoFile.bas -------------------------------------------------------------------------------- /scripts/Modules/Y_Options.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/Y_Options.bas -------------------------------------------------------------------------------- /scripts/Modules/ZA_ParserString.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/ZA_ParserString.bas -------------------------------------------------------------------------------- /scripts/Modules/ZB_DeleteLinksFile.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "ZB_DeleteLinksFile" 2 | Option Explicit 3 | Option Private Module 4 | 5 | Private Const sFULL_PATH As String = "Full path to the file:" 6 | Private Const sFILE_LINKS As String = "File with a link" 7 | Private Const sDELETE As String = "DELETE" 8 | 9 | Public Sub deleteAllLinksInFile() 10 | 9: Dim sFileNameFull As Variant 11 | 10: Dim bFlag As Boolean 12 | 11: 13 | 12: sFileNameFull = SelectedFile(vbNullString, False, "*.xls;*.xlsm;*.xlsx") 14 | 13: If TypeName(sFileNameFull) = "Empty" Then Exit Sub 15 | 14: 16 | 15: If MsgBox("Create backup files ?", vbYesNo + vbQuestion, "Removing passwords:") = vbYes Then 17 | 16: bFlag = True 18 | 17: End If 19 | 18: 20 | 19: On Error GoTo errMsg 21 | 20: 22 | 21: Dim sFullNameFile As String 23 | 22: Dim cEditOpenXML As clsEditOpenXML 24 | 23: Dim sPathLinks As String 25 | 24: Dim bMsg As Boolean 26 | 25: 27 | 26: sFullNameFile = sFileNameFull(1) 28 | 27: Set cEditOpenXML = New clsEditOpenXML 29 | 28: With cEditOpenXML 30 | 29: .CreateBackupXML = bFlag 31 | 30: .SourceFile = sFullNameFile 32 | 31: .UnzipFile 33 | 32: sPathLinks = .XLFolder & "externalLinks" 34 | 33: If FileHave(sPathLinks, Directory) Then 35 | 34: Dim objFso As Object 36 | 35: Set objFso = CreateObject("Scripting.FileSystemObject") 37 | 36: objFso.DeleteFolder (sPathLinks) 38 | 37: Set objFso = Nothing 39 | 38: bMsg = True 40 | 39: End If 41 | 40: .ZipAllFilesInFolder 42 | 41: End With 43 | 42: Set cEditOpenXML = Nothing 44 | 43: If bMsg Then 45 | 44: Call MsgBox("The links in the file were completely deleted: [" & sGetBaseName(sFullNameFile) & "]", vbInformation, "Deleting links:") 46 | 45: Else 47 | 46: Call MsgBox("In the file: [" & sGetBaseName(sFullNameFile) & "] no links to other files!", vbInformation, "Deleting links:") 48 | 47: End If 49 | 48: 50 | 49: Exit Sub 51 | errMsg: 52 | 51: Select Case Err.Number 53 | Case Else 54 | 53: Call MsgBox("Error in deleteAllLinksInFile" & vbLf & Err.Number & vbLf & Err.Description & vbCrLf & "in the line" & Erl, vbOKOnly + vbCritical, "Mistake:") 55 | 54: Call WriteErrorLog("deleteAllLinksInFile") 56 | 55: End Select 57 | 56: Set cEditOpenXML = Nothing 58 | 57: End Sub 59 | 60 | Public Sub getListAllLinksInFile() 61 | 60: Dim sFileNameFull As Variant 62 | 61: 63 | 62: sFileNameFull = SelectedFile(vbNullString, False, "*.xls;*.xlsm;*.xlsx") 64 | 63: If TypeName(sFileNameFull) = "Empty" Then Exit Sub 65 | 64: 66 | 65: On Error GoTo errMsg 67 | 66: 68 | 67: Dim sFullNameFile As String 69 | 68: Dim cEditOpenXML As clsEditOpenXML 70 | 69: Dim sPathLinks As String 71 | 70: Dim bMsg As Boolean 72 | 71: 73 | 72: sFullNameFile = sFileNameFull(1) 74 | 73: Set cEditOpenXML = New clsEditOpenXML 75 | 74: With cEditOpenXML 76 | 75: .CreateBackupXML = False 77 | 76: .SourceFile = sFullNameFile 78 | 77: .UnzipFile 79 | 78: sPathLinks = .XLFolder & "externalLinks\_rels" 80 | 79: If FileHave(sPathLinks, Directory) Then 81 | 80: Dim objFso As Object 82 | 81: Dim objFolder As Object 83 | 82: Dim objFile As Object 84 | 83: Dim i As Integer 85 | 84: Dim j As Integer 86 | 85: Dim arrFile() As String 87 | 86: Dim sXML As String 88 | 87: Const sTARGET As String = " Target=" 89 | 88: 90 | 89: Set objFso = CreateObject("Scripting.FileSystemObject") 91 | 90: Set objFolder = objFso.GetFolder(sPathLinks) 92 | 91: 93 | 92: For Each objFile In objFolder.Files 94 | 93: If objFile.Name Like "*.rels" Then 95 | 94: j = j + 1 96 | 95: ReDim Preserve arrFile(1 To 2, 1 To j) 97 | 96: arrFile(1, j) = objFile.Name 98 | 97: sXML = .GetXMLFromFile(arrFile(1, j), sPathLinks & Application.PathSeparator) 99 | 98: If sXML Like "*" & sTARGET & VBA.Chr$(34) & "*" Then 100 | 99: sXML = VBA.Right$(sXML, VBA.Len(sXML) - VBA.InStr(1, sXML, sTARGET) - VBA.Len(sTARGET)) 101 | 100: sXML = VBA.Left$(sXML, VBA.InStr(1, sXML, VBA.Chr$(34)) - 1) 102 | 101: arrFile(2, j) = sXML 103 | 102: End If 104 | 103: End If 105 | 104: Next 106 | 105: Set objFolder = Nothing 107 | 106: Set objFso = Nothing 108 | 107: bMsg = True 109 | 108: End If 110 | 109: .ZipAllFilesInFolder 111 | 110: End With 112 | 111: Set cEditOpenXML = Nothing 113 | 112: 114 | 113: If bMsg Then 115 | 114: ActiveWorkbook.Worksheets.Add 116 | 115: With ActiveCell 117 | 116: .Value = sFULL_PATH 118 | 117: .Offset(0, 1).Value = sFullNameFile 119 | 118: .Offset(1, 0).Value = sFILE_LINKS 120 | 119: .Offset(1, 1).Value = "The file to which the link goes" 121 | 120: .Offset(1, 2).Value = "Action (put down)" 122 | 121: .Offset(2, 0).Resize(UBound(arrFile, 2), UBound(arrFile, 1)).Value2 = WorksheetFunction.Transpose(arrFile) 123 | 122: .Offset(2, 2).Resize(UBound(arrFile, 2), 1).Value2 = sDELETE 124 | 123: End With 125 | 124: Call MsgBox("Creating a list of links from a file:[" & sGetBaseName(sFullNameFile) & "]", vbInformation, "Creating a list:") 126 | 125: Else 127 | 126: Call MsgBox("In the file: [" & sGetBaseName(sFullNameFile) & "] no links to other files!", vbInformation, "Creating a list:") 128 | 127: End If 129 | 128: 130 | 129: Exit Sub 131 | errMsg: 132 | 131: Select Case Err.Number 133 | Case Else 134 | 133: Call MsgBox("Error in getListAllLinksInFile" & vbLf & Err.Number & vbLf & Err.Description & vbCrLf & "in the line" & Erl, vbOKOnly + vbCritical, "Mistake:") 135 | 134: Call WriteErrorLog("getListAllLinksInFile") 136 | 135: End Select 137 | 136: Set cEditOpenXML = Nothing 138 | 137: 139 | 138: End Sub 140 | 141 | Public Sub deleteLinksOnList() 142 | 141: Dim bFlag As Boolean 143 | 142: Dim arrVal As Variant 144 | 143: Dim errMsg As String 145 | 144: Dim sFullNameFile As String 146 | 145: 147 | 146: On Error GoTo errMsg 148 | 147: 149 | 148: With ActiveSheet 150 | 149: Dim lLastRow As Long 151 | 150: lLastRow = .Cells(.Rows.Count, 1).End(xlUp).Row 152 | 151: If lLastRow < 3 Then 153 | 152: Call MsgBox("There is no data table!", vbCritical, "Mistake:") 154 | 153: Exit Sub 155 | 154: End If 156 | 155: If .Cells(1, 1).Value <> sFULL_PATH Then 157 | 156: errMsg = "Field not found [" & sFULL_PATH & "]" & vbNewLine 158 | 157: End If 159 | 158: If .Cells(2, 1).Value <> sFILE_LINKS Then 160 | 159: errMsg = errMsg & "Field not found [" & sFILE_LINKS & "]" & vbNewLine 161 | 160: End If 162 | 161: 163 | 162: sFullNameFile = .Cells(1, 2).Value 164 | 163: 165 | 164: If sFullNameFile = vbNullString Then 166 | 165: errMsg = errMsg & "The file path is not set:" & vbNewLine 167 | 166: ElseIf Not FileHave(sFullNameFile) Then 168 | 167: errMsg = errMsg & "The path to the file does not exist" & vbNewLine 169 | 168: End If 170 | 169: 171 | 170: If errMsg <> vbNullString Then 172 | 171: Call MsgBox("The data table is not recognized:" & vbNewLine & errMsg, vbCritical, "Mistake:") 173 | 172: Exit Sub 174 | 173: End If 175 | 174: 176 | 175: arrVal = .Range(.Cells(3, 1), .Cells(lLastRow, 3)).Value2 177 | 176: End With 178 | 177: 179 | 178: If MsgBox("Create backup files ?", vbYesNo + vbQuestion, "Removing passwords:") = vbYes Then 180 | 179: bFlag = True 181 | 180: End If 182 | 181: 183 | 182: Dim cEditOpenXML As clsEditOpenXML 184 | 183: Dim sPathLinks As String 185 | 184: Dim sPathLinksRels As String 186 | 185: Dim bMsg As Boolean 187 | 186: Dim i As Integer 188 | 187: Dim iCount As Integer 189 | 188: Dim sfileName As String 190 | 189: 191 | 190: Set cEditOpenXML = New clsEditOpenXML 192 | 191: With cEditOpenXML 193 | 192: .CreateBackupXML = bFlag 194 | 193: .SourceFile = sFullNameFile 195 | 194: .UnzipFile 196 | 195: sPathLinks = .XLFolder & "externalLinks" & Application.PathSeparator 197 | 196: sPathLinksRels = sPathLinks & "_rels" & Application.PathSeparator 198 | 197: 199 | 198: For i = 1 To UBound(arrVal) 200 | 199: sfileName = arrVal(i, 1) 201 | 200: If arrVal(i, 3) = sDELETE And FileHave(sPathLinksRels & sfileName) Then 202 | 201: Call Kill(sPathLinks & VBA.Replace(sfileName, ".rels", vbNullString)) 203 | 202: Call Kill(sPathLinksRels & sfileName) 204 | 203: bMsg = True 205 | 204: iCount = iCount + 1 206 | 205: End If 207 | 206: Next i 208 | 207: .ZipAllFilesInFolder 209 | 208: End With 210 | 209: Set cEditOpenXML = Nothing 211 | 210: 212 | 211: If bMsg Then 213 | 212: Call MsgBox("The links in the file were deleted: [" & sGetBaseName(sFullNameFile) & "]" & vbNewLine & "Deleted: [" & iCount & "] connections!", vbInformation, "Deleting links:") 214 | 213: Else 215 | 214: Call MsgBox("In the file: [" & sGetBaseName(sFullNameFile) & "] no links to other files!", vbInformation, "Deleting links:") 216 | 215: End If 217 | 216: 218 | 217: Exit Sub 219 | errMsg: 220 | 219: Select Case Err.Number 221 | Case Else 222 | 221: Call MsgBox("Error in deleteLinksOnList" & vbLf & Err.Number & vbLf & Err.Description & vbCrLf & "in the line" & Erl, vbOKOnly + vbCritical, "Mistake:") 223 | 222: Call WriteErrorLog("deleteLinksOnList") 224 | 223: End Select 225 | 224: Set cEditOpenXML = Nothing 226 | End Sub 227 | -------------------------------------------------------------------------------- /scripts/Modules/ZC_HotKey.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "ZC_HotKey" 2 | '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 3 | '* Module : ZC_HotKey 4 | '* Created : 23-06-2022 16:21 5 | '* Author : VBATools 6 | '* Contacts : http://vbatools.ru/ https://vk.com/vbatools 7 | '* Copyright : VBATools.ru 8 | '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 9 | Option Explicit 10 | Option Private Module 11 | 12 | Public Sub hotKeysStart() 13 | 12: 14 | 13: If Not ThisWorkbook.Name = C_Const.NAME_ADDIN & ".xlam" Then Exit Sub 15 | 14: 16 | 15: On Error GoTo errMsg 17 | 16: Dim sPatpApp As String 18 | 17: sPatpApp = ThisWorkbook.Path & Application.PathSeparator & FILE_NAME_HOT_KEYS 19 | 18: If FileHave(sPatpApp) Then 20 | 19: Call Shell(sPatpApp) 21 | 20: Else 22 | 21: Call MsgBox("File not found -" & FILE_NAME_HOT_KEYS, vbInformation, "HotKeys:") 23 | 22: End If 24 | 23: Exit Sub 25 | errMsg: 26 | 25: Call WriteErrorLog("hotKeysStart") 27 | 26: End Sub 28 | 29 | Public Sub hotKeysStop() 30 | 29: On Error GoTo errMsg 31 | 30: 32 | 31: Dim sPatpApp As String 33 | 32: sPatpApp = ThisWorkbook.Path & Application.PathSeparator & FILE_NAME_HOT_KEYS 34 | 33: If FileHave(sPatpApp) Then 35 | 34: Dim WshShell As Object 36 | 35: Set WshShell = CreateObject("WScript.Shell") 37 | 36: If Not WshShell Is Nothing Then 38 | 37: Dim WshExec As Object 39 | 38: Set WshExec = WshShell.Exec(sPatpApp) 40 | 39: If Not WshShell Is Nothing Then WshExec.Terminate 41 | 40: Set WshExec = Nothing 42 | 41: End If 43 | 42: Set WshShell = Nothing 44 | 43: End If 45 | 44: 46 | 45: Exit Sub 47 | errMsg: 48 | 47: Call WriteErrorLog("hotKeysStop") 49 | End Sub 50 | -------------------------------------------------------------------------------- /scripts/Modules/Z_Clipboard.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/Modules/Z_Clipboard.bas -------------------------------------------------------------------------------- /scripts/Modules/Z_TabbedMDI.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Z_TabbedMDI" 2 | Option Explicit 3 | Option Private Module 4 | 5 | Private Const S_OK = 0 6 | Private hResult As Long 7 | 8 | #If Win64 Then 9 | Private Const DLLNAME = "vbemdi64.dll" 10 | Private Declare PtrSafe Function Connect Lib "vbemdi64.dll" (ByVal r As Object) As Long 11 | Private Declare PtrSafe Function Disconnect Lib "vbemdi64.dll" () As Long 12 | Private Declare PtrSafe Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As LongPtr 13 | Private Declare PtrSafe Function FreeLibrary Lib "kernel32" (ByVal hLibModule As LongPtr) As Long 14 | Private m_hDll As LongPtr 15 | #Else 16 | Private Const DLLNAME = "vbemdi.dll" 17 | Private Declare Function Connect Lib "vbemdi.dll" (ByVal r As Object) As Long 18 | Private Declare Function Disconnect Lib "vbemdi.dll" () As Long 19 | Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long 20 | Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long 21 | Private m_hDll As Long 22 | #End If 23 | 24 | Public Sub AddTabbed() 25 | Dim dllPath As String 26 | dllPath = Environ("APPDATA") & "\Microsoft\AddIns\" & DLLNAME 27 | If Dir(dllPath) <> "" Then 28 | 'Debug.Assert (m_hDll = 0) 29 | If (m_hDll = 0) Then m_hDll = LoadLibrary(dllPath) 30 | 'Debug.Assert (m_hDll <> 0) 31 | If m_hDll <> 0 Then 32 | hResult = Connect(Application) 33 | 'Debug.Assert (hResult = S_OK) 34 | 'Debug.Print DLLNAME & "::Connect()" 35 | End If 36 | Else 37 | Debug.Print DLLNAME & " file not found", vbCritical 38 | End If 39 | End Sub 40 | 41 | Public Sub CloseTabed() 42 | If (m_hDll <> 0) Then 43 | hResult = Disconnect() 44 | 'Debug.Assert (hResult = S_OK) 45 | FreeLibrary m_hDll 46 | m_hDll = 0 47 | End If 48 | End Sub 49 | 50 | -------------------------------------------------------------------------------- /scripts/UserForms/AddCodeView.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/AddCodeView.frm -------------------------------------------------------------------------------- /scripts/UserForms/AddEditCode.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/AddEditCode.frm -------------------------------------------------------------------------------- /scripts/UserForms/AddOptions.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/AddOptions.frm -------------------------------------------------------------------------------- /scripts/UserForms/AddStatistic.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/AddStatistic.frm -------------------------------------------------------------------------------- /scripts/UserForms/BilderFormat.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/BilderFormat.frm -------------------------------------------------------------------------------- /scripts/UserForms/BilderProcedure.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/BilderProcedure.frm -------------------------------------------------------------------------------- /scripts/UserForms/CharsMonitor.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/CharsMonitor.frm -------------------------------------------------------------------------------- /scripts/UserForms/HiddenModule.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/HiddenModule.frm -------------------------------------------------------------------------------- /scripts/UserForms/InfoFile.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/InfoFile.frm -------------------------------------------------------------------------------- /scripts/UserForms/InfoFile2.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/InfoFile2.frm -------------------------------------------------------------------------------- /scripts/UserForms/InsertIconUserForm.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} InsertIconUserForm 3 | Caption = "Icons:" 4 | ClientHeight = 9810 5 | ClientLeft = 45 6 | ClientTop = 390 7 | ClientWidth = 20265 8 | OleObjectBlob = "InsertIconUserForm.frx":0000 9 | StartUpPosition = 1 'CenterOwner 10 | Tag = "No" 11 | End 12 | Attribute VB_Name = "InsertIconUserForm" 13 | Attribute VB_GlobalNameSpace = False 14 | Attribute VB_Creatable = False 15 | Attribute VB_PredeclaredId = True 16 | Attribute VB_Exposed = False 17 | Option Explicit 18 | Private WithEvents Emitter As EventListenerEmitter 19 | Attribute Emitter.VB_VarHelpID = -1 20 | Private Sub Emitter_DblClick(control As Object, Cancel As MSForms.ReturnBoolean) 21 | Unload Me 22 | End Sub 23 | Private Sub Label821_Click() 24 | Dim i As Integer 25 | Dim cnt As MSForms.control 26 | 27 | For Each cnt In Me.Controls 28 | If TypeName(cnt) = "Label" Then 29 | i = i + 1 30 | End If 31 | Next cnt 32 | Debug.Print i - 6 33 | End Sub 34 | Private Sub UserForm_Initialize() 35 | Set Emitter = New EventListenerEmitter 36 | With Emitter 37 | .AddEventListenerAll Me 38 | End With 39 | End Sub 40 | Private Sub Emitter_MouseOut(control As Object) 41 | Call FrmBtnColor(control, vbWhite) 42 | End Sub 43 | Private Sub Emitter_MouseOver(control As Object) 44 | Call FrmBtnColor(control, vbBlack, vbWhite, vbRed) 45 | If control.Tag <> "No" Then 46 | With control 47 | lbNameFont.Caption = .Font 48 | lbCapiton.Caption = .Caption 49 | lbASC.Caption = VBA.AscW(.Caption) 50 | End With 51 | End If 52 | End Sub 53 | Public Sub FrmBtnColor(ByRef control As Object, ByVal BackColor As Long, Optional ByVal ForeColor As Long = vbBlack, Optional ByVal BorderColor As Long = vbBlack) 54 | With control 55 | If .Tag <> "No" Then 56 | With control 57 | .BackColor = BackColor 58 | .ForeColor = ForeColor 59 | .BorderColor = BorderColor 60 | End With 61 | End If 62 | End With 63 | End Sub 64 | 65 | -------------------------------------------------------------------------------- /scripts/UserForms/ModuleCommander.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/ModuleCommander.frm -------------------------------------------------------------------------------- /scripts/UserForms/ModuleTODO.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/ModuleTODO.frm -------------------------------------------------------------------------------- /scripts/UserForms/MsgBoxGenerator.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/MsgBoxGenerator.frm -------------------------------------------------------------------------------- /scripts/UserForms/ObfuscationCode.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/ObfuscationCode.frm -------------------------------------------------------------------------------- /scripts/UserForms/OptionsCodeFormat.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/OptionsCodeFormat.frm -------------------------------------------------------------------------------- /scripts/UserForms/ProtectedSheets.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/ProtectedSheets.frm -------------------------------------------------------------------------------- /scripts/UserForms/RegExpTemplateManager.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/RegExpTemplateManager.frm -------------------------------------------------------------------------------- /scripts/UserForms/SettingsAddCommentsProc.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/SettingsAddCommentsProc.frm -------------------------------------------------------------------------------- /scripts/UserForms/VariableUnUsed.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/VariableUnUsed.frm -------------------------------------------------------------------------------- /scripts/UserForms/VersionSistemControls.frm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vbatools/MacroToolsVBA/9f9e2d803cd4ef5c5a78b50e70dc898c04f93a4f/scripts/UserForms/VersionSistemControls.frm --------------------------------------------------------------------------------