This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'Excelの日付入力時に年末年始の時期だけ年数を書き換えるイベントマクロ | |
'基本方針 | |
' 1. Excelではセルにmm/dd形式で入力した時に今年が自動補完されるが、 | |
' 今月が1月で入力が12月の場合、前年に戻す | |
' 今月が12月で入力が1月の場合、来年に進む | |
' という自動補完に変更する。 | |
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'特定のエクセルウィンドウだけを並べて表示する | |
'https://twitter.com/KotorinChunChun/status/1228606400768593920?s=20 | |
Sub ExcelWindowArrange(targets, arrange_style As XlOrientation) | |
Const PROC_NAME = "ExcelWindowArrange" | |
Dim win As Window | |
Dim obj As Variant | |
'targetsを解析:整列対象のWindowコレクションを準備 | |
Dim arrangeWindows As Collection: Set arrangeWindows = New Collection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rem | |
Rem 作業グループ禁止アドイン メインモジュール | |
Rem | |
Rem 2020/02/18 : 初回版 | |
Rem 2020/02/27 : Gist公開用調整 | |
Rem | |
Rem @KotorinChunChun | |
Rem | |
Option Explicit | |
Option Private Module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'vbeProcedureオブジェクトを作成してそれらのコレクションを返す | |
'モジュール中のコードを解析し、モジュール内のプロシージャ情報をリストアップする | |
Private Function getProcedures(codeMod As CodeModule) As Collection | |
Dim StartLine As Long | |
Dim ProcName As String | |
Dim lastProcName As String | |
Dim lastProcKind As vbext_ProcKind | |
Dim procs As New Collection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'RegApp 1.レジストリアプリケーション管理 | |
'HKEY_CURRENT_USER\Software\VB and VBA Program Settings\[AppName] | |
Option Explicit | |
Public AppName As String | |
Public Function section(Section_ As String) As RegSec | |
Set section = New RegSec | |
Set section.App = Me | |
section.section = Section_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rem -------------------------------------------------- | |
Rem ■kccFuncString | |
Rem 文字列変換関数 からの抜粋 | |
Rem | |
Rem | |
Rem -------------------------------------------------- | |
Option Explicit | |
Rem 文字列を一文字毎の配列に変換 | |
Rem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'#VBAクイズ | |
'出典:http://www.excel.studio-kazu.jp/kw/20200517225250.html | |
'> AAAの値をAAB,AAC...AAZまでインクリメントし | |
'> 次のアルファベットを桁上げし、ABA,ABC?ZZZまで | |
'> 計算するコードを書きたい | |
'の解答 | |
'https://twitter.com/KotorinChunChun/status/1262026213352026112?s=20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rem -------------------------------------------------------------------------------- | |
Rem | |
Rem @module kccFuncExcelPartial | |
Rem | |
Rem @description Excelオブジェクト操作関数 | |
Rem | |
Rem @update 2020/06/24 | |
Rem | |
Rem @author @KotorinChunChun (GitHub / Twitter) | |
Rem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Rem 動的に多次元配列のテストデータを生成するテスト | |
Sub Test_CreateTestArray() | |
Dim tStart As Single, tStop As Single: tStart = Timer | |
Dim i | |
For i = 1 To 1000 | |
Dim arr | |
arr = CreateTestArray(1, 5, 4, 3, 4, 5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private name_ | |
Private age_ | |
Rem 標準モジュール用 | |
Public Function Init1(pName, pAge) As MyClass | |
Set Init1 = Me | |
name_ = pName | |
age_ = pAge |
OlderNewer