Hello Craig,
I suspect you may have ambigious text box names. It isn't clear from your post if you are calling Update_Inventory from the other forms.
I have cleaned your code up and added a restriction to it. If the text box isn't on frmThree then exit the routine. Look this over and let men know if I have understood you correctly or not.
Calling the Sub:
Update_Inventory (TextBox3)
Updated Code:
Sub Update_Inventory(ByRef TB As MSForms.TextBox)
Dim frmName As String
Dim tbName As String
Dim tbNumber As Integer
'Get the Name of the Form the TextBox is on
frmName = TB.Parent.Name
'Is TextBox on frmThree?
If frmName <> "frmThree" Then Exit Sub
'Get the TextBox Name
tbName = TB.Name
'Extract the TextBox Number
tbNumber = Val(Mid(tbName, 8, Len(tbName) - 7))
If tbNumber <= 20 Then iPass = tbNumber + 171
If tbNumber >= 21 Then iPass = tbNumber + 151
'Format the TextBox Text as Currency
TB.Text = Format(TB.Text, "Currency")
If tbNumber <= 20 Then SpecialCount.Cells(iPass, 14).Value = TB.Text
If tbNumber >= 21 Then SpecialCount.Cells(iPass, 26).Value = TB.Text
TextBox116.Text = Format(SpecialCount.Range("Z190").Value, "Currency")
End Sub
Sincerely,
Leith Ross
Bookmarks