Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Checking Entry

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Checking Entry

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Checking Entry

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Checking Entry

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Checking Entry

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Checking Entry

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
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
evnet code, checking for entry Tami Excel Worksheet Functions 3 December 19th 09 04:59 PM
Spell Checking with checking cell notes jfitzpat Excel Discussion (Misc queries) 0 August 8th 07 10:26 PM
Cell Entry That Locks Selected Cells From Any Data Entry. ron Excel Worksheet Functions 5 February 16th 07 09:52 PM
Checking & Forcing Data Entry in Cells robertguy Excel Discussion (Misc queries) 1 January 23rd 06 06:01 PM
Checking if a cell entry is correct before adding it to another Zakynthos Excel Worksheet Functions 4 July 28th 05 10:46 AM


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