Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When UF4 comes up, the user enters the PO# in TextBox1. If this PO# is
already on the list, a message comes up letting the user know. It is suppose to then unload the UF, then reload it. I wanted the UF unloaded instead of just clearing TextBox1 in case the user entered data in some of the other textboxes before getting to TextBox1. The problem is that after the message comes up, the program locks up, and you have to take Excel down via the task manager. This works fine if I only have TextBox1 cleared after the message. But, that's not how I want it to run. Can anyone see a problem with the coding? Thanks, J.O. Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'This will check to make sure the PO# the user entered is not already on 'the list. If so, message box comes up. With Worksheets("Official list") If TextBox1.Text < "" And Not .Range("j:j").Find(TextBox1.Text, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False) Is Nothing Then MsgBox "This PO# is already on the list. Please enter the information in the existing Record.later." Unload UserForm4 UserForm4.Show ' TextBox1.Text = Clear ' Cancel = True End If End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
row locking, instead of file locking? | Excel Discussion (Misc queries) | |||
locking formula in cells in without locking whole sheet | Excel Discussion (Misc queries) | |||
Userform to enter values and shown in same userform in list | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Activating userform and filling it with data form row where userform is activate | Excel Programming |