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: 22
Default In textbox required only number without decimal


Hi,

Please see the below coding, This working fine, But is accepting the decimal
value also(.),

What i required is when ever i type dot(.) it need to show msg "Please Enter
Correct Number"

Eg:1) 6161.8976, 2)98450.0, 3)8.874 need to show msg "Please Enter Correct
Number" and delete the what ever typed that means nullstring in that textbox.

Private Sub TextBox11_Change()
Worksheets("FOR").Activate
Range("C1").Select
Range("C1").Value = TextBox11.Value
If Not IsNumeric(TextBox11.Value) And TextBox11.Value < vbNullString Then
MsgBox "Please Enter Correct Number"
TextBox11.Value = vbNullString
End If
End Sub

I'm very newbie for this coding. please anyone can help me on this.

Thanks in advance
Deen
 
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
Making a Textbox Required Field LRay67 Excel Programming 6 March 31st 08 04:51 PM
caused - an integer or decimal number may be required donn Excel Discussion (Misc queries) 3 September 13th 06 11:01 AM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM
Runtime error textbox problem - help required N E Body Excel Programming 3 October 19th 04 10:27 PM
Formatting userform textbox - help required Kennyatwork Excel Programming 3 February 6th 04 04:58 PM


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