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
Public Sub CopyActiveBookPath() | |
Dim path As String | |
path = ActiveWorkbook.FullName | |
With CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}") | |
.SetText path | |
.PutInClipboard | |
End With | |
End Sub |
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
@echo off | |
pushd %0\.. | |
setlocal enabledelayedexpansion | |
set "TARGET_FOLDER=D:\xxxx" | |
for /f "tokens=*" %%a in ('dir %TARGET_FOLDER% /b /a:d') do ( | |
set SHOULD_DEL=true | |
for /f "tokens=1* skip=1" %%i in (include.list) do ( | |
if "%%a"=="%%j" ( | |
echo [DEBUG] -- バックアップ対象:%%j |
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
@echo off | |
rem 指定時刻にシャットダウンするバッチ | |
rem 秒は許容誤差とし、算出しない | |
rem 18:00にシャットダウン | |
set HOUR=18 | |
set /a H=%HOUR%-1-%TIME:~0,2% | |
set /a M=60-%TIME:~3,2% | |
echo %HOUR%時まで%H%時間%M%分 |
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
set /p IS_EXEC=実行しますか?[y/n] | |
if /i not "%IS_EXEC%"=="y" ( | |
echo 処理をキャンセルします。 | |
goto END | |
) | |
echo 終了しました。 | |
:END | |
pause |
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
'全モジュールエクスポート | |
' | |
'Excelの設定を以下の通りに変更すること | |
'1)オプション -> セキュリティーセンター -> [セキュリティーセンターの設定]ボタン押下 | |
'2)マクロ設定(左ペイン) -> [VBAプロジェクトオブジェクトモデルへのアクセスを信頼する] チェックON | |
Public Sub ExportAllModule() | |
Dim destDir As String | |
With CreateObject("WScript.Shell") | |
destDir = .SpecialFolders("Desktop") & "\modules" |
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
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) | |
Call MoveNextController(KeyCode, TextBox2) | |
End Sub | |
Public Sub MoveNextController(ByVal KeyCode As MSForms.ReturnInteger, nextCtrl As Object) | |
If KeyCode = vbKeyTab Or KeyCode = vbKeyReturn Then | |
nextCtrl.Activate | |
End If | |
End Sub |
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
@echo off | |
cd /d %~dp0 | |
echo IEのキャッシュをクリアします。 | |
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255 | |
echo IEのキャッシュをクリアしました。 | |
pause > NUL |
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
If InStr(LCase(WScript.FullName), "wscript") > 0 Then | |
WScript.CreateObject("WScript.Shell").Run("CScript """ & WScript.ScriptFullName & """ //Nologo " & WScript.Arguments(0)) | |
WScript.Quit | |
End If | |
MsgBox WScript.Arguments(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
'コレクションをセル範囲に設定可能な2次元配列に変換します。 | |
'コレクションのvalueには1行分のデータをIndex0から設定してください。 | |
Public Function ConvertListToArrayRange(list As Collection) As Variant() | |
Dim rowCnt As Long | |
Dim colCnt As Long | |
rowCnt = list.Count | |
colCnt = UBound(list(1)) | |
Dim arr() As Variant |
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
値(10進) 定義 意味 | |
-----------+--------------------------------+-------------- | |
1 ROLE_SYSTEM_TITLEBAR タイトルバー | |
2 ROLE_SYSTEM_MENUBAR メニューバー | |
3 ROLE_SYSTEM_SCROLLBAR スクロールバー | |
4 ROLE_SYSTEM_GRIP グリップ | |
5 ROLE_SYSTEM_SOUND サウンド | |
6 ROLE_SYSTEM_CURSOR カーソル | |
7 ROLE_SYSTEM_CARET キャレット | |
8 ROLE_SYSTEM_ALERT アラート |
NewerOlder