Skip to content

Instantly share code, notes, and snippets.

eggist77 / getFilePathDlgIE.vbs
Created Jul 4, 2020
View getFilePathDlgIE.vbs
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
ie.document.write "<html><body><input type='file' id='selectFileDialog'></body></html>"
eggist77 / getFilePathDlgExcel.vbs
Created Jul 4, 2020
View getFilePathDlgExcel.vbs
Function getFilePathDlgExcel()
Dim excel
Set excel = CreateObject("Excel.Application")
buf = excel.GetOpenFilename("Text File,*.txt,All,*.*",1,"ファイルを選択して下さい","開く",false)
If buf <> False Then
getFilePathDlgExcel = buf
End If
End Function
View getFileList.vbs
Set fso = CreateObject("Scripting.FileSystemObject")
folderPath = "."
getFileList fso.getFolder(folderPath)
sub getFileList(ByVal folder)
for each subFolder in folder.subfolders
WScript.Echo "d," & & "," & subFolder.size & "," & subFolder.ParentFolder
View VBS_FileExists_FolderExists.vbs
Dim filePath
Dim folderPath
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(filePath) then
View vbs_logger.vbs
class Logger
'@ description : Logger
'@ auther : t.n
'@ version : 1.0
'@ since : 2020.4.4
'@ update : 2020.4.4
private fso
eggist77 / initValue.vb
Created Mar 28, 2020
VBA initValue.vb
View initValue.vb
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
View gist:3143a27721ce867416f65f404f7bf17f
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)
View nLib.vbs
'nLib Version = 1.11
Function dateFormat(ByVal format)
' format
' yyyymm
' yyyymmdd(default)
' yyyymmddhhmmss
' yyyymmdd_hhmmss
View accessVBA.vb
Private Sub saveBtn_Click()
DoCmd.RunCommand acCmdSaveRecord
End Sub
Private Sub canselBtn_Click()
End Sub
View pathGet.vbs
Set fso = CreateObject("Scripting.FileSystemObject")
' Get ScriptFile folder
msgbox fso.getParentFolderName(WScript.ScriptFullName)
You can’t perform that action at this time.