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 saveBtn_Click() | |
DoCmd.RunCommand acCmdSaveRecord | |
End Sub | |
'キャンセルボタン | |
Private Sub canselBtn_Click() | |
Me.Undo | |
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
'nLib Version = 1.11 | |
Function dateFormat(ByVal format) | |
' format | |
' yyyymm | |
' yyyymmdd(default) | |
' yyyymmddhhmmss | |
' yyyymmdd_hhmmss |
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
Sub formatCondition() | |
Dim r As Range | |
Dim formatCondition As FormatCondition | |
'範囲設定 | |
Set r = Range("A1:A5") | |
'条件付き書式の追加 | |
Set formatCondition = r.FormatConditions.Add(Type:=xlTextString, String:="OK", TextOperator:=xlContains) |
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
Sub initValue() | |
Dim initBoolean As Boolean | |
Dim initByte As Byte | |
Dim initInteger As Integer | |
Dim initLong As Long | |
Dim initSingle As Single | |
Dim initDouble As Double | |
Dim initCurrency As Currency | |
Dim initDate As Date |
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
class Logger | |
'------------------------------------------------------ | |
'@ description : Logger | |
'@ auther : t.n | |
'@ version : 1.0 | |
'@ since : 2020.4.4 | |
'@ update : 2020.4.4 | |
'------------------------------------------------------ | |
private fso |
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
Dim filePath | |
Dim folderPath | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
If fso.FileExists(filePath) then | |
'あるよ | |
Else | |
'ないよ |
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 fso = CreateObject("Scripting.FileSystemObject") | |
folderPath = "." | |
getFileList fso.getFolder(folderPath) | |
sub getFileList(ByVal folder) | |
for each subFolder in folder.subfolders | |
WScript.Echo "d," & subFolder.name & "," & subFolder.size & "," & subFolder.ParentFolder |
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
Function getFilePathDlgExcel() | |
Dim excel | |
Set excel = CreateObject("Excel.Application") | |
buf = excel.GetOpenFilename("Text File,*.txt,All,*.*",1,"ファイルを選択して下さい","開く",false) | |
If buf <> False Then | |
getFilePathDlgExcel = buf | |
Else | |
WScript.Quit | |
End If | |
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
Function getFilePathDlgIE() | |
Dim ie | |
Set ie = WScript.CreateObject("InternetExplorer.Application") | |
ie.Navigate "about:blank" | |
Do While ie.Busy = True And ie.ReadyState <> 4 'READYSTATE_COMPLETE = 4 | |
WScript.Sleep 100 | |
Loop | |
ie.document.write "<html><body><input type='file' id='selectFileDialog'></body></html>" | |
ie.document.getElementById("selectFileDialog").click |
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
$CurrentDir = Split-Path $MyInvocation.MyCommand.Path | |
# 1 | |
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | | |
Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | | |
Export-csv -path $CurrentDir"\ProgramList1.csv" -Encoding Default -NoTypeInformation | |
# 2 | |
Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | | |
Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | |