https://github.com/betchx/xlamTemplate
A template of Excel VBA addin file with automatic menu etc
https://github.com/betchx/xlamTemplate
Last synced: 4 months ago
JSON representation
A template of Excel VBA addin file with automatic menu etc
- Host: GitHub
- URL: https://github.com/betchx/xlamTemplate
- Owner: betchx
- License: mit
- Created: 2021-06-05T05:32:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-06T02:49:19.000Z (almost 4 years ago)
- Last Synced: 2024-08-13T07:18:15.088Z (8 months ago)
- Language: VBA
- Homepage:
- Size: 1.31 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - betchx/xlamTemplate - A template of Excel VBA addin file with automatic menu etc (VBA)
README
# xlamTemplate
A template of Excel VBA addin file with automatic menu etc.## Feature
Add easy Access to created macros.### Automatic Dynamic Menu
It scan internal codes and add buttons into a dynamic menu in the "Home tab".
Special comments before subroutine definition provide follows:
* Customized icon
* Customized Caption
* Tooltips
* Visibility
* Context based Visibility#### Customized Icon
"' imageMso: idMSO" can change button icon to specified one by the isMSO.
The idMSO can be obtained from Microsoft's information.
(see https://docs.microsoft.com/en-us/openspecs/office_standards/ms-customui/3f465fd5-af0e-4d3b-80eb-53f90f5c7a3a )#### Customized Caption
Macro name is used for button caption as default.
"' label: TEXT" can change the caption to the TEXT.#### Tooltips
Two type tooltips can be added.
"' screentip:" adds comment into upper side of tooltip. (default: name of Macro)
"' supertip:" adds comments into lower side od tooltip. (default: none)#### Visibility
Non-private subroutines without any argument will be added into the dynamic menus.
"' hidden:" can suppress this behavior for next subroutine even if it is no-argument non-public subroutine.#### Context based visibility
"' target: TYPE" can limit the visibility of button and menu by selection.
Following macro will be shown only if any of selection and its parent is TYPE.
The TYPE is usually Range, Chart or Shape.### Exporting code
### Save as addin
### Automatic disabling installed addin
# xlamテンプレート
Microsoft ExcelのVBAアドイン開発者用テンプレート## 特徴
内部のマクロを実行しやすくくします.### 動的自動メニュー
アドイン内部のコードを走査して,マクロを呼び出すメニューをホームタブに追加します.#### ボタンのカスタマイズ
マクロ定義の直前に記入したスペシャルコメントにより,次のようなカスタマイズが可能.
* アイコンの変更
* キャプションの変更
* ツールチップの追加
* 可視性
* 選択表示ほかにもあるが,詳細は仕様書を参照.
#### アイコンの変更
"' imageMso: idMSO"
idMSOで指定されたものにアイコンを変更する.
idMSOはマイクロソフトからの情報を参照のこと.
(参考: https://docs.microsoft.com/en-us/openspecs/office_standards/ms-customui/3f465fd5-af0e-4d3b-80eb-53f90f5c7a3a )#### キャプションの変更
通常はマクロ名がキャプションとして使用される.
"' label: TEXT" を追加することで,TEXTをボタンのキャプションにできる.#### ツールチップの追加
ツールチップの上下2か所の記入欄にコメントを記入可能.
上部: "' screentip:" (デフォルトはマクロ名)#### 可視性
Privateでなく,引数のないサブルーチンがマクロとしてメニューに登録される.
しかし,"' hidden:"を追加することで,登録されないようにできる.#### 選択表示
現在選択されているもの応じてボタンを表示するかどうかを制御できる.
"' target: TYPE"を追あすると,Selectionもしくはその親(Parent)にあるものの型がTYPEの場合にのみ表示される様になる.
TYPEにはたいていの場合,"Range"か"Chart"で,たまに"Shape"も用いられる.### コードの書き出し
### アドインとして保存
### インストール済みアドインの自動無効化