| 
    
     |  | アクティブセルへ入力した後、ユーザーフォームのTextBox1へ フォーカスを移動をさせたい。
 フォーカスがセルにもユーザーフォームにもない状態になっています。
 よろしくお願いします。
 
 Private Sub TextBox1_Change()
 Dim n As Long
 Me.Label1.Caption = Len(Me.TextBox1.Text)
 If Len(Me.TextBox1.Text) = 30 Then
 If YN確認("30文字になりました" & vbCr & "データ入力しますか?") = vbYes Then
 ActiveCell.Value = Me.TextBox1.Text
 Application.Goto ActiveCell.Offset(1, 0)
 Me.TextBox1.Text = Empty
 '
 Me.TextBox1.TabIndex = 0
 Me.TextBox1.SetFocus  '<<<===TextBox1が入力可能状態にならない
 End If
 End If
 End Sub
 
 '入力確認メッセージを表示
 Function YN確認(Msg As String)
 Dim Style As VbMsgBoxStyle
 Dim Title As String
 Style = vbYesNo + vbExclamation + vbDefaultButton1
 Title = "入力確認"
 YN確認 = MsgBox(Msg, Style, Title)  'vbYes = 実行 , vbNo = 中止
 End Function
 
 
 |  |