Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
is there a way to force my user to enter only numbers in a textbox?
and in other only letters? theres quite a few textboxe's some thing like this perhaps? with me. textbox1 textbox2 textbox3 ..numbers.only thanx all |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Right click each textbox, view code and paste this in to ensure numbers only. Remove 'Not' to ensure letters only, Don't forget to change the name of the text box as appropriate. Private Sub TextBox1_Change() If Not IsNumeric(TextBox1.Value) And TextBox1.Value < vbNullString Then MsgBox "Sorry, only numbers/letters allowed" TextBox1.Value = vbNullString End If End Sub Mike "pswanie" wrote: is there a way to force my user to enter only numbers in a textbox? and in other only letters? theres quite a few textboxe's some thing like this perhaps? with me. textbox1 textbox2 textbox3 .numbers.only thanx all |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanx rick...
one more Q. how will i go to the last cell in column b and make that the caption for label1? As for your second item, this will do it... Label1.Caption = Cells(25, "B").Value Rick "pswanie" wrote in message ... i got a few labels on a userform. most of them in a frame. 1) few of them need to show data in sheet1 colum a cell 1 untill empty row 2) other just need to show sheet1 column b cell 25 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using TEXT and &TEXT - display numbers with commas, underline text | Excel Discussion (Misc queries) | |||
excel save as csv - force text qualifier on every text field | Excel Discussion (Misc queries) | |||
force numbers as text as seen on screen | Excel Discussion (Misc queries) | |||
force Excel to treat numbers as text | New Users to Excel | |||
force evaluation of text | Excel Discussion (Misc queries) |