OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 14-11-2010, 00:25
0meg@ 0meg@ is offline
Member
 
Join Date: Nov 2010
Posts: 37
Default Text Box, how input only digits

Need to restrict text box input, is there some settings in propeties of control or i must write code?
Reply With Quote
  #2  
Old 14-11-2010, 08:02
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,790
Blog Entries: 13
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default TextBox

You will need to write code to validate the data.

-Shelby
Reply With Quote
  #3  
Old 15-11-2010, 07:56
aakkaarr aakkaarr is offline
Senior Member
 
Join Date: Jan 2009
Posts: 163
Default Use the Sub

Private Sub OnlyNumbers()
If TypeName(Me.ActiveControl) = "TextBox" Then
With Me.ActiveControl
If Not IsNumeric(.Value) And .Value <> vbNullString Then
MsgBox "Sorry, only numbers allowed"
.Value = 0
.SetFocus
End If
End With
End If
End Sub
Reply With Quote
  #4  
Old 15-11-2010, 23:11
0meg@ 0meg@ is offline
Member
 
Join Date: Nov 2010
Posts: 37
Default

aakkaarr Thank you so much!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get Text from CSV-File and create Graphics-Object infers Graphic-Text anlulu CorelDRAW/Corel DESIGNER VBA 3 14-03-2009 03:02
Write#, Input# CWCN CorelDRAW/Corel DESIGNER VBA 4 30-09-2008 23:29
Input in diffrent units without switching vindaa CorelDRAW/Corel DESIGNER VBA 3 04-07-2008 01:46
Help with Color Number Input and Fill JudyHNM CorelDRAW/Corel DESIGNER VBA 2 08-11-2007 10:39
CD11: Adding input from user form to document ddonnahoe Code Critique 2 09-04-2004 12:43


All times are GMT -5. The time now is 06:32.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com