エクセル株式トレード応用編(レジストリ)


テクニカル投資研究会:https://technical-analysis-research.com/
今回のプログラムソース
‘m01ボタン制御(モジュール)
‘—————————————————————-

””””””””””””””””””””””””””””””””
‘ パスワード登録
””””””””””””””””””””””””””””””””
Sub s31パスワード登録()
Dim wStr As String

wStr = InputBox(“パスワードを登録してください。”, “パスワード”)
If wStr = “” Then
Else
Call RegSet(“pass”, wStr)
End If

End Sub

””””””””””””””””””””””””””””””””
‘ パスワード参照
””””””””””””””””””””””””””””””””
Sub s32パスワード参照()

Range(“T5”) = RegGet(“pass”)

End Sub

””””””””””””””””””””””””””””””””
‘ レジストリ削除
””””””””””””””””””””””””””””””””
Sub s33レジストリ削除()

Call RegDel

Range(“T5”) = “”

End Sub


‘m03Registryモジュール
‘—————————————————————
Private Const wcApp As String = “exceltest”
Private Const wcSec As String = “order”


Public Sub RegSet(wKey As String, x As Variant)

SaveSetting appname:=wcApp, _
section:=wcSec, _
Key:=wKey, _
setting:=x

End Sub

Public Function RegGet(wKey As String) As Variant
RegGet = GetSetting(wcApp, wcSec, wKey, “”)
End Function


Public Sub RegDel()
DeleteSetting appname:=wcApp
End Sub