' 標準モジュールに記述ここから −−−−−−−−−−−−−−−−−−−−−−−−−−−
Public Sub test() SyainForm.Show
End Sub
Public Sub SetSyainData(ByRef pWrkSyainData As SyainData)
SyainForm.LblName = pWrkSyainData.Name
SyainForm.LblKinzoku = pWrkSyainData.Kinzoku
SyainForm.LblSyozoku = pWrkSyainData.Syozoku
SyainForm.LblYakusyoku = pWrkSyainData.Yakusyoku
End Sub
' 標準モジュールに記述ここまで −−−−−−−−−−−−−−−−−−−−−−−−−−−
' フォームモジュールに記述ここから −−−−−−−−−−−−−−−−−−−−−−−−−
Private Sub BtnOK_Click()
Dim i As Long
Dim WrkSyainData() As SyainData
If GetSyainData(WrkSyainData()) Then
For i = 1 To UBound(WrkSyainData)
If WrkSyainData(i).Id = TxtID Then
Call SetSyainData(WrkSyainData(i))
Exit For
End If
Next i
Else
MsgBox "SyainMSTに不正なデータがあるため処理を中断しました", vbCritical
End If
End Sub
' フォームモジュールに記述ここまで −−−−−−−−−−−−−−−−−−−−−−−−−
' フォームモジュールに記述ここから −−−−−−−−−−−−−−−−−−−−−−−−−
Private Sub BtnOK_Click()
Dim i As Long
Dim WrkSyainData() As SyainData
If GetSyainData(WrkSyainData()) Then
For i = 1 To UBound(WrkSyainData)
If WrkSyainData(i).Id = TxtID Then
Call SetSyainData(WrkSyainData(i))
Exit For
End If
Call ClearLabel
Next i
Else
MsgBox "SyainMSTに不正なデータがあるため処理を中断しました", vbCritical
End If
End Sub
Private Sub UserForm_Initialize()
Call ClearLabel
BtnOK.Caption = "OK"
End Sub
Private Function ClearLabel()
LblName = ""
LblKinzoku = ""
LblSyozoku = ""
LblYakusyoku = ""
End Function
' フォームモジュールに記述ここまで −−−−−−−−−−−−−−−−−−−−−−−−−