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: 6
Default TextBox problem in a UserForm

I am having a problem with a TextBox in a UserForm.

Private Sub TextBox130_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Dim MyPrompt As String
MyPrompt = "Please input a Number!"

If IsNumeric(TextBox130.Value) Then

TextBox130.Value = Round(TextBox130.Value, 0)
JobArea(0).SqFt = TextBox130.Value
Call UpdateSqFtTotal

Else
Cancel = True
TextBox130.Text = ""

MsgBox MyPrompt, vbInformation, "Pro Paver Installer Data Input"

End If

End Sub

The problem I am having is that when a character is entered and after you
click OK on the MsgBox there is no cursor in TextBox130. There is no cursor
on the UserForm. If you type, nothing appears on the UserForm. If you hit
enter after typeing, the MsgBox appears but nothing is displayed in the
TextBox130. If you place the mouse pointer in another textbox and click, the
MsgBox appears. I have tryed placing TextBox.SetFocus before and after the
MsgBox but that does not help.
For TextBox130 this is the only code that is active.

If you remove the MsgBox from the code the code works correctly. But I
would like to display a message if the incorrect data is entered.

I am using Excel 2000. I have been at other forms and people tell me the
code works for them. What else could be wrong with my code?

Thanks for any help.
--
SailFL
 
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
TEXTBOX in USERFORM RUUD VAN DEURSEN Excel Programming 5 March 1st 05 03:36 PM
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
Excel VBA - Userform Checkbox/Textbox Problem Thunder5 Excel Programming 1 February 16th 04 02:06 PM
Userform Textbox - Date Problem universal[_6_] Excel Programming 2 November 26th 03 04:31 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 08:20 AM.

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"