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: 74
Default Textbox Decimile Problem

Hi,

I have a UserForm with many textboxes. the below Procedure is for the
Unit Price Textbox. I put two restrictions on it,

1. to restrict blank entry
2. to restrict alphabatical entry

both are working fine, but when I try to enter the value like 23.05
or 135.15 its not accepted. I mean the value in decimile its not
accepting.

Private Sub TxtUnitPrice_Exit(ByVal Cancel As MSForms.ReturnBoolean)
' to restrict blank entry
If txtUnitPrice.Text = "" Then
MsgBox "Sorry, please enter the Unit Price to proceed..."
Cancel = True
End If
End Sub

Private Sub txtUnitPrice_KeyPress(ByVal KeyAscii As
MSForms.ReturnInteger)
' to restrict entry for Numbers only
If KeyAscii < Asc("0") Or KeyAscii Asc("9") Then
Interaction.Beep
KeyAscii = 0
End If
End Sub

if anyone knows how to fix this problem. pls send me the solution, I
will be highly appreciated......

Thanks and regards.


Syed Shahzad Zafar
Madinah
 
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 problem Greg B[_11_] Excel Programming 0 December 6th 07 02:22 PM
Textbox problem mondolfo Excel Programming 2 May 23rd 06 05:41 PM
Textbox Problem toocold[_21_] Excel Programming 4 April 18th 06 04:01 PM
Textbox problem Robert Couchman[_4_] Excel Programming 11 February 26th 04 02:01 PM
TextBox SetFocus Problem Tom Ogilvy Excel Programming 1 September 12th 03 01:27 PM


All times are GMT +1. The time now is 03:06 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"