Skip to content

Instantly share code, notes, and snippets.

@eggist77
eggist77 / vba_access_vba.vb
Last active August 10, 2021 12:34
vba vba_access_vba.vb
'保存ボタン
Private Sub saveBtn_Click()
DoCmd.RunCommand acCmdSaveRecord
End Sub
'キャンセルボタン
Private Sub canselBtn_Click()
Me.Undo
End Sub
@eggist77
eggist77 / nLib.vbs
Last active August 10, 2021 12:33
vbs nLibrary
'nLib Version = 1.11
Function dateFormat(ByVal format)
' format
' yyyymm
' yyyymmdd(default)
' yyyymmddhhmmss
' yyyymmdd_hhmmss
@eggist77
eggist77 / vba_read_text.vba
Last active August 7, 2021 11:57
vba read text
Sub read_text()
Dim buf As String
Dim n As Integer 'file number
Dim file As String
file = "C:\tmp\test.txt"
n = FreeFile
Open file For Input As #n
@eggist77
eggist77 / vba_init_value.vb
Last active July 18, 2021 06:32
VBA 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
@eggist77
eggist77 / vba_make_arrow.vb
Last active July 18, 2021 06:31
vba: Insert an arrow in the selection hatena: entry/20181121/1542802915
' @description Insert an arrow in the selection hatena: entry/20181121/1542802915
' @auther n.
' @version 1.0
' @since 2018.11.21
' @update 2018.11.21
Sub makeArrow()
Dim r As Range
Set r = Selection
@eggist77
eggist77 / pathGet.vbs
Last active February 10, 2021 12:54
hatena: entry/20200411/1586561707
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
'1.Get ScriptFile folder
MsgBox fso.getParentFolderName(WScript.ScriptFullName)
'2.C:\Windows\System32
MsgBox fso.getParentFolderName("C:\Windows\System32\notepad.exe")
'3.notepad.exe
@eggist77
eggist77 / ssh.ttl
Last active November 12, 2019 12:23
;------------------------------------------------------
; @description : ssh for CentOS
; @auther : n
; @version : 1.1
; @since : 2019/4/9
; @update : 2019/11/12
;------------------------------------------------------
target='192.168.0.1'
username='user'
' ---------------------------------------------------
' description:
' auther: name
' version: 1.0
' since: yyyy/mm/dd
' update: yyyy/mm/dd
' ---------------------------------------------------
Option Explicit
@eggist77
eggist77 / telnet.ttl
Last active April 10, 2019 13:28
telnet.ttl
;------------------------------------------------------
; @description : telnet for CentOS
; @auther : n
; @version : 1.0
; @since : 2019/4/9
; @update : 2019/4/9
;------------------------------------------------------
target='192.168.0.1'
username='user'
;autocmd.ttl
macroname = 'autocmd'
cmdlist = 'cmdlist.txt'
prompt1 = '$'
prompt2 = '#'
timeout = 15
;コマンドリストチェック
filesearch cmdlist