Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way of checking the input of a Msgbox in terms of if it
numeric or alphabetical eg if i only want alphabetical, and someone enter a number o alpnumric, then get to to display a warning. Cheer -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A MessageBox does not have input. You are probably referring to an InputBox.
Look at Help for the InputBox Method rather than the InputBox Function. The former allows you control over the input type. -- Vasant "mushy_peas " wrote in message ... Is there a way of checking the input of a Msgbox in terms of if its numeric or alphabetical eg if i only want alphabetical, and someone enter a number or alpnumric, then get to to display a warning. Cheers --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sorry, the box is a simple, ie
Colset = InputBox("What column is the PASS Results", "Selec Results Column" -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you can use this as a function or embed it in your code
sub MySub( Colset = InputBox("What column is the PASS Results", "Selec Results Column" if IsAlpha(Colset) = False then Msgbox "No numbers allowed" : Exit su end su Function IsAlpha(Colset) As Boolea Dimy As Long, z As Lon y = Len(colset For z = 1 To If Mid(colset, z, 1) Like "[0-9]" The IsAlpha = Fals Exit Functio Nex IsAlpha = Tru End Function |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Function IsAlpha(Colset) As Boolea
Dim y As Long, z As Lon y = Len(Colset For z = 1 To If Mid(x, z, 1) Like "[0-9]" The IsAlpha = Fals Exit Functio End If <<<<<<<< Nex IsAlpha = Tru End Functio ----- chris wrote: ---- you can use this as a function or embed it in your code sub MySub( Colset = InputBox("What column is the PASS Results", "Selec Results Column" if IsAlpha(Colset) = False then Msgbox "No numbers allowed" : Exit su end su Function IsAlpha(Colset) As Boolea Dimy As Long, z As Lon y = Len(colset For z = 1 To If Mid(colset, z, 1) Like "[0-9]" The IsAlpha = Fals Exit Functio Nex IsAlpha = Tru End Function |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks ~ x but its dodnt quite work. even if i enter a number no messag
comes up -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
evnet code, checking for entry | Excel Worksheet Functions | |||
Spell Checking with checking cell notes | Excel Discussion (Misc queries) | |||
Cell Entry That Locks Selected Cells From Any Data Entry. | Excel Worksheet Functions | |||
Checking & Forcing Data Entry in Cells | Excel Discussion (Misc queries) | |||
Checking if a cell entry is correct before adding it to another | Excel Worksheet Functions |