Hi All,

I Have a Spreadsheet that uses 2 Userforms. Userform1 and Userform2.

The main Userform is Userform1.

If a certain textbox on Userform 1 is Filled with a specific Value type in this case Numbers then Userform1 Unloads, Userform2 loads and the activecell is offset to another cell (This must happen everytime userform2 is used) once the Textbox in UserForm2 has been filled it unloads and Userform1 reloads to carry on.. this can happen consistantly.

Code for the TextBox in Userform1 to Unload and show UserForm2:

Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)

ActiveCell = TextBox1

If IsNumeric(TextBox1.Value) Then

Dim oneControl As Object
 
For Each oneControl In UserForm1.Controls
    Select Case TypeName(oneControl)
    Case "TextBox"
        oneControl.Text = vbNullString
    End Select
Next oneControl
Unload Me

UserForm2.Show

End If

End Sub
Code for UserForm2:

Private Sub TextBox9_Enter()
ActiveCell.Offset(RowOffset:=-1, ColumnOffset:=4).Select
Label2.Caption = ActiveCell.Offset(, -1).Text
End Sub

Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean)
ActiveCell = TextBox9
Dim oneControl As Object
 
For Each oneControl In UserForm2.Controls
    Select Case TypeName(oneControl)
    Case "TextBox"
        oneControl.Text = vbNullString
    End Select
Next oneControl
Unload Me
UserForm1.Show
End Sub
This works for the First instance that UserForm2 is shown but when it is called again the offset doesn't work.

Can anyone tell me why?

Any help would be greatly appreciated.

Regards

JRidge