Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Validate user inputted name.

I can't find an answer to this.

Any ideas how I can validate the user input from an inputbox to insure that
the name entered is a valid name, ie Name only contaings letters, numbers,
periods, and underscore, and begins with a letter, and is not a cell
reference type string.

I'm hoping I don't have to re-invent this vaildation routine and can use
something built in.

Thanks,
John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Validate user inputted name.

check each character ?

return = inputbox()
bok =True
for index = 1 to len(return)
select case mid(return,1,1)
case in "abcdefghijklmnopqrstuv {and so on}"
case else
msgbox mid(return,1,1) & " is not allowed"
bOk =False
end select
if not bok then exit for
next
if bok then
msgbox "value ok"
else
msgbox "try again"
end if




"DocBrown" wrote in message
...
I can't find an answer to this.

Any ideas how I can validate the user input from an inputbox to insure
that
the name entered is a valid name, ie Name only contaings letters, numbers,
periods, and underscore, and begins with a letter, and is not a cell
reference type string.

I'm hoping I don't have to re-invent this vaildation routine and can use
something built in.

Thanks,
John


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
Validate user input with specific date format YH Excel Programming 4 August 24th 06 02:38 PM
I want a macro to save a workbook as a user inputted cell EAHRENS Excel Discussion (Misc queries) 3 November 8th 05 03:28 PM
Keeping user-inputted data with pivot table contents BetM Excel Programming 2 July 28th 04 01:45 PM
Excel VBA - Find User Inputted Variable andibevan Excel Programming 3 June 9th 04 03:55 PM
Validate text box entry on user form Gareth[_3_] Excel Programming 2 November 20th 03 09:59 PM


All times are GMT +1. The time now is 03:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"