Hi,
Complete novice here so sorry if im not using the correct terminology.
I have a worksheet that I have created 2 userforms for, UserForm1 I want to load if the current row being used in column O states "parts oversized" or "parts undersized" and UserForm2 is the same apart from column Q states "parts overweight" or "parts underweight". This worksheet will be used as a database for results so I don't want it to trigger the UserForms on old rows, if that is possible?
I have the Userforms adding the additional data to the worksheet, but i can not get them to load if columns O or Q contain the text above, I don't know if its because columns O and Q are filled by an IF formula.
Any help would be greatly appreciated, code for loading userform below.
Complete novice here so sorry if im not using the correct terminology.
I have a worksheet that I have created 2 userforms for, UserForm1 I want to load if the current row being used in column O states "parts oversized" or "parts undersized" and UserForm2 is the same apart from column Q states "parts overweight" or "parts underweight". This worksheet will be used as a database for results so I don't want it to trigger the UserForms on old rows, if that is possible?
I have the Userforms adding the additional data to the worksheet, but i can not get them to load if columns O or Q contain the text above, I don't know if its because columns O and Q are filled by an IF formula.
Any help would be greatly appreciated, code for loading userform below.
VBA Code:
Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cell As Range
For Each cell In Range("O:O")
If cell.Value = "Part Underweight" Then
UserForm1.Show
If cell.Value = "Part Overweight" Then
UserForm1.Show
End If
Next cell
End Sub