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 えくせるちゅんちゅん | |
Rem 2019/10/26 | |
Rem https://www.excel-chunchun.com/entry/vba-sheet-copy | |
Rem | |
Rem SheetsCopy | |
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
Rem -------------------------------------------------- | |
Rem ■Outlookでメール受信者がローカルパスをクリックできるようにするマクロ2 | |
Rem | |
Rem パスをUNC表記に置き換えることでハイパーリンク化されるようにする案 | |
Rem | |
Rem えくせるちゅんちゅん | |
Rem 2019/10/22 | |
Rem https://www.excel-chunchun.com/entry/outlook-path-hyperlink-2 | |
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
Rem -------------------------------------------------- | |
Rem ■Outlookでメール受信者がローカルパスをクリックできるようにするマクロ | |
Rem | |
Rem えくせるちゅんちゅん | |
Rem 2019/10/21 | |
Rem https://www.excel-chunchun.com/entry/outlook-path-hyperlink | |
Rem | |
Rem -------------------------------------------------- | |
Option Explicit |
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 VBA Declare宣言 64bit対応変換ツール | |
Rem | |
Rem 新規で作成したユーザーフォームのコードに貼り付けで使用する | |
Rem | |
Option Explicit | |
Private Const GWL_STYLE = (-16) | |
Private Const WS_THICKFRAME = &H40000 |
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 Win32APIのDeclare文を自動的に64bit対応コードに変換するプログラム | |
Rem | |
Rem ■公開先 | |
Rem | |
Rem えくせるちゅんちゅん | |
Rem 2019/10/20 | |
Rem VBAでWin32APIの64bit対応自動変換プログラムを作ってみた | |
Rem https://www.excel-chunchun.com/entry/vba-64bit-declare-convert | |
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
VERSION 1.0 CLASS | |
BEGIN | |
MultiUse = -1 'True | |
END | |
Attribute VB_Name = "BinaryFileIO" | |
Attribute VB_GlobalNameSpace = False | |
Attribute VB_Creatable = False | |
Attribute VB_PredeclaredId = True | |
Attribute VB_Exposed = False | |
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 | |
'#VBA100本ノック 13本目 | |
'選択セル(Selection:複数範囲あり)の文字列に「注意」という文字があった場合は、 | |
'その「注意」の文字だけを"赤の太字"に設定してください。 | |
'セル以外(図形等)が選択されている場合は何もせずに正常終了するようにしてください。 | |
'※一部仕様を無視 | |
' 図形選択前に選択していたセルを使ってでも絶対に処理を実行する | |
Sub vba_knock013() |
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 | |
'VBA100本ノック14本目 | |
'出題を勘違いして答えた人の末路 | |
Sub vba_knock14() | |
Dim wb As Workbook: Set wb = ActiveWorkbook | |
Dim ws As Worksheet | |
Dim moveWss As Variant: ReDim moveWss(0 To 0) '0はダミー | |
'削除すべきシートを特定 |
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 | |
Sub knock41() | |
Dim res As Dictionary: Set res = Quiz四則演算いっぱい出題(99, 20, 3) | |
Dim msg As Dictionary: Set msg = New Dictionary | |
Dim key, 正解数 | |
For Each key In res.Keys | |
正解数 = 正解数 + IIf(res.Item(key), 1, 0) | |
msg.Add Join(Array( _ | |
IIf(res.Item(key), "○", "×"), _ |
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 選択中のセルの化学式の書式を整えるVBAマクロ | |
Sub 選択範囲の化学式の書式を整える() | |
Dim MyRange As Range | |
Dim i As Integer | |
Dim s2 As String, s3 As String | |
Dim PHflg As Boolean | |
For Each MyRange In Selection | |
For i = 2 To Len(MyRange.Text) | |
s2 = Mid(MyRange.Text, i - 1, 2) |