List 7-176 FormPrintSelectフォームのBTN_OK_Clickプロシージャ,BTN_CANCEL_Clickプロシージャなど


  1: Public Selected As Long
  2: 
  3: Private Sub BTN_CANCEL_Click()
  4:     ' [キャンセル]ボタンが押されたときの処理
  5:     Selected = -1
  6:     Me.Hide
  7: End Sub
  8: 
  9: Private Sub BTN_OK_Click()
 10:     ' [OK]ボタンが押されたときの処理
 11:     If OPT_PRINTTABLE.Value Then
 12:         Selected = 1
 13:     End If
 14:     If OPT_PRINTDETAILALL.Value Then
 15:         Selected = 2
 16:     End If
 17:     If OPT_PRINTDETAILSELECTED.Value Then
 18:         Selected = 3
 19:     End If
 20:     Me.Hide
 21: End Sub
 22: 
 23: Private Sub Form_Activate()
 24:     Selected = -1
 25: End Sub