Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default UserForm help....

I am trying to get a message box to appear when the user doesn't fill in
required information. The following will do that, however, if the userform is
closed, the message will still show up..I am new at all of this so any help
would be greatly appreciated.

Thanks in advance.
Dawn


Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Dim mybox As String
mybox = TextBox1.Text
If Not IsEmpty(mybox) And mybox = "" Then
MsgBox "Enter KanBan Number", vbOKOnly

Cancel = True

Else
End If
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default UserForm help....

Dawn,

Not quite clear. How does the MsgBox show up? If the form is not up, that
code should never execute. The code is in the userform is it not?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dawn" wrote in message
...
I am trying to get a message box to appear when the user doesn't fill in
required information. The following will do that, however, if the userform

is
closed, the message will still show up..I am new at all of this so any

help
would be greatly appreciated.

Thanks in advance.
Dawn


Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Dim mybox As String
mybox = TextBox1.Text
If Not IsEmpty(mybox) And mybox = "" Then
MsgBox "Enter KanBan Number", vbOKOnly

Cancel = True

Else
End If
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default UserForm help....

You are right..the form is up, but if they click cancel to start over(clears
contents) it will show up, also if they click the x to close the userform it
will pop up again.

"Bob Phillips" wrote:

Dawn,

Not quite clear. How does the MsgBox show up? If the form is not up, that
code should never execute. The code is in the userform is it not?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dawn" wrote in message
...
I am trying to get a message box to appear when the user doesn't fill in
required information. The following will do that, however, if the userform

is
closed, the message will still show up..I am new at all of this so any

help
would be greatly appreciated.

Thanks in advance.
Dawn


Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Dim mybox As String
mybox = TextBox1.Text
If Not IsEmpty(mybox) And mybox = "" Then
MsgBox "Enter KanBan Number", vbOKOnly

Cancel = True

Else
End If
End Sub




Reply
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
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM
userform always on top? dok112[_34_] Excel Programming 1 October 10th 04 10:43 PM
Linking userform to userform in Excel 2003 missmelis01 Excel Programming 2 August 27th 04 08:07 PM
Userform inside another userform Ryan Excel Programming 0 April 23rd 04 08:01 PM
userform Antonov Excel Programming 6 August 26th 03 03:41 AM


All times are GMT +1. The time now is 05:56 AM.

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

About Us

"It's about Microsoft Excel"