Hi,
I have 2 userforms, when the first (userform1) links to the second (userform6), the change event in the second will not activate.
The strange thing is, if I run the second userform directly, all of the code executes perfectly.
Anyone know of anything which can cause this?
Part of userform1:
Private Sub userform_initialize()
MatVal.AddItem ("303 Stainless Steel")
MatVal.AddItem ("416 Stainless Steel")
BuildButton.Enabled = False
End Sub
Private Sub TDVal_change()
RemoveChar = 1
If Not IsNumeric(UserForm1.TDVal.Value) And Len(UserForm1.TDVal) <> 0 Then
If Len(UserForm1.TDVal) < 1 Then RemoveChar = 0
UserForm1.TDVal = Left(UserForm1.TDVal, Len(UserForm1.TDVal) - RemoveChar)
UserForm1.Hide
UserForm6.Show LINKS HERE
End If
If MatVal.Text <> "Select Material" And TDVal <> "" And SLVal <> "" And (EngBox = True Or MarkBox = True) Then
BuildButton.Enabled = True
Else
BuildButton.Enabled = False
End If
End Sub
Part of userform6:
Private Sub userform_initialize()
BuyButton.Enabled = False
End Sub
Private Sub Acc_change() (SUB DOESN'T ACTIVATE)
RemoveChar = 1
If Not IsNumeric(UserForm6.Acc.Value) And Len(UserForm6.Acc) <> 0 Or Len(UserForm6.Acc) > 8 Then
If Len(UserForm6.Acc) < 1 Then RemoveChar = 0
UserForm6.Acc = Left(UserForm6.Acc, Len(UserForm6.Acc) - RemoveChar)
UserForm6.Repaint
End If
If IsNumeric(UserForm6.Acc.Value) And Len(UserForm6.Acc) = 8 And IsNumeric(UserForm6.Sort1.Value) And Len(UserForm6.Sort1) = 2 And IsNumeric(UserForm6.Sort2.Value) And Len(UserForm6.Sort2) = 2 And IsNumeric(UserForm6.sort3.Value) And Len(UserForm6.sort3) = 2 And IsNumeric(UserForm6.Sec.Value) And Len(UserForm6.Sec) = 3 Then
BuyButton.Enabled = True
Else
BuyButton.Enabled = False
End If
End Sub
Any ideas?
Cheers
SolidworksApi macros