Memoru

System Engineering and Programming and IT

2004-VBA Data Type

No Item Content ConvertFunc
1 Primitive
2 Boolean Dim bln As Boolean CBool(value)
3 Long Dim i As Long CLng(value)
4 Double Dim n As Double CDbl(value)
5 Currency Dim yen As Currency CCur(value)
6 Date Dim dtm As Date CDate(value)
7 String Dim str As String CStr(value)
8 Variant Dim vnt As Variant CVar(value)
9 Byte CByte(value)
10 Interger CInt(value)
11 Single CSng(value)
12 VBA variable
13 Array Primitive型を配列で定義
14 Collection "Dim clt As Collection (key Arrayが取れない)
Set clt = New Collection"
15 Excel Object
16 Range "Dim rng As Range
Let rng = ThisWorkbook.WorkSheets(Activeworksheet.Name).Range(""A1"")"
17 Worksheet "Dim sht As Worksheet
Set sht = ThisWorkbook.WorkSheets(Activeworksheet.Name)"
18 Workbook "Dim wb As Workbook
Set wb = ThisWorkbook"
19 Name "Dim nm As Name
Set nm = ThisWorkbook.Names(""target_name"")"
20 ListObject Dim lstObj As ListObject
21 Chart Dim cht As Chart -
22 Shape Dim shp As Shape -
23 VBScript COM Object
24 Microsoft Scripting Runtime
25 Dictionary Dim dict As Dictionary
26 FileSystemObject Dim objFSO As FileSystemObject
27 Folder Dim folder As Folder
28 File Dim file As File
29 .Net Framework
30 ArrayList "Set a reference on VBA Toolbar of tool -> reference
C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.tlb
Microsoft Common Language Runtime Class Library
Dim aryList As Object '// ArrayList
Set aryList = CreateObject(""System.Collections.ArrayList"")"
31 StringBuilder Set objSB = CreateObject("System.Text.StringBuilder")
32 Third Party Utility Libraries
33 JSON Dim JSON As JSONLib
34 Template Dim Template As MiniTemplator
35 Custom Type or Object
36 Enum
37 Type
38 Class

2004-VBE-Shortcuts

No Item Content
1 windows activation
2 Alt+F11 Change Active windows on VBE or Excel Sheet
3 ctrl+G Emmeditate Window
4 F7 Code Editor
5 Shift+F7 Object Ppoperty
6 F2 Object Browser
7 F4 Property Window
8 ctrl+R Project Browser
9 Alt+V+H Watch Window
10 Debug and run
11 Alt+D + Enter Compile VBA Project
12 F5 Run
13 ctrl+G a shortcut for debug
14 ctrl+G dev shortcut for debug
15 ctrl+G ctrl+a del Emmediate Window Clear
16 F8 Step in
17 Shift+F8 Step over
18 ctrl+F8 Run to cursor
19 shift+ctrl+F8 Step out
20 Alt+D + A Add Watch
21 ctrl+W Edit Watch
22 shift+F9 Quick Watch
23 F9 Toggle Breakpoint
24 shift+ctrl+F9 Clear all breakpoints
25 ctrl+F9 Set next statement
26 moudle import, export and insert
27 ctrl+M Import Module
28 ctrl+E Export
29 Alt+i + M Insert Module
30 Alt+i + C Insert Class Module
31 jump
32 shift+F2 Jump to definition
33 shift+ctrl+F2 Back to the last position
34 prp+D Jump to definition
35 ctrl + ↑ Go to previous definition
36 ctrl + ↓ Go to next definition
37 ctrl+f Search
38 F3 Next
39 support functionality
40 ctrl+space complete word
41 ctrl+j List properties and methods
42 ctrl+i Quick information
43 shift+ctrl+j List constants
44 shift+ctrl+i Prameter information
45 Alt+E B Bookmark

2003-ExcelVBA::function-parameter-definition

Excel VBA function parameter definition

No Item Content
1 Optional "Every optional parameter in the procedure definition must specify a default value.
The default value for an optional prameter must be a constant expression.
Every parameter following an optional parameter in the procedure definiton must also be optional."
2 ByVal By Value
3 ByRef By Reference
4 PararmArray A parameter array can be used to pass an array of arguments to a procedure. You don't have to know the number of elements int the array when you define the procedure.
5 varname Variable parameter name
6 type type
7 defaultValue default value if it is missing

Code sample

result on immediate window

run
----- Try Code start--------------!
 1 
 2 
 3 
 4 
 5 
----- Try Code --------------  end!

2003-node-powershell

reference

rannn505.gitbook.io

get started

console log

PS G:\sandbox\nodepwsh> npm start

> nodepwsh@1.0.0 start G:\sandbox\nodepwsh
> node index

Hello node and powershell


    Directory: G:\sandbox\nodepwsh


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       19/03/2020     09:43                lib
d-----       19/03/2020     09:38                node_modules
-a----       19/03/2020     09:38           1075 .gitignore
-a----       19/03/2020     09:39             18 index.js
-a----       19/03/2020     09:38           2940 package-lock.json
-a----       19/03/2020     09:40            370 package.json