フォーム

リストボックスの初期化・状態取得

初期選択状態の指定 InStr関数を使用しています 'strInstsの初期状態で「[野球][音楽]」などの様式の文字列 For i = 0 To lbxInsts.ListCount - 1 'リストボックスの0行から最終行まで反復処理 strTemp = "[" & lbxInsts.List(i, 1) & "]" lbxInsts.Selected…

コントローラ(スピンボタン)

スピンボタン スピンボタンの値をID指定セルの値と同期するために シート変更イベント「Worksheet_Change」を監視 Private Sub SpinButton1_Change() Sheets("明細書印刷用").Range("A10").Value = SpinButton1.Value End Sub ' スピンボタンの値をID指定セ…

入力チェック

文字列幅のチェック Dim strYearMonth As String strYearMonth = Sheets("データ設定").Range("C11") If Len(strYearMonth) = 6 Then 'MsgBox strYearMonth & " " & Len(strYearMonth) Else MsgBox strYearMonth & " 対象年月は6桁で指定してください" Exit…

フォームの表示・アンロード

show FORM hide FORM unload FORM Range Range("B" & x_id).Value = Me.txtTitle.Text Cell

リストボックス・インデクス