LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default UserForm locking up

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
row locking, instead of file locking? Bob W Excel Discussion (Misc queries) 2 September 7th 07 09:36 PM
locking formula in cells in without locking whole sheet SuziQ Excel Discussion (Misc queries) 1 July 21st 06 03:58 PM
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM


All times are GMT +1. The time now is 11:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"