PC Review


Reply
Thread Tools Rate Thread

2-character limit on InputBox

 
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      18th Jul 2007
Hi All........
I am using the following line to present the user with a opportunity to
input some data. I would like to accept 0, 1, or 2 characters and reject 3
or more characters for a re-do.....help please

choice1 = InputBox("Enter PlannerCode to search for:")

TIA
Vaya con Dios,
Chuck, CABGx3


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmltIFRob21saW5zb24=?=
Guest
Posts: n/a
 
      18th Jul 2007
Neither InputBox nor Application.InputBox have any kind of validation or
input mask so if you either have to validate the input after the fact or
create a form with a text box to do what you want to do. My preference would
be for the form but to each his own...
--
HTH...

Jim Thomlinson


"CLR" wrote:

> Hi All........
> I am using the following line to present the user with a opportunity to
> input some data. I would like to accept 0, 1, or 2 characters and reject 3
> or more characters for a re-do.....help please
>
> choice1 = InputBox("Enter PlannerCode to search for:")
>
> TIA
> Vaya con Dios,
> Chuck, CABGx3
>
>

 
Reply With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      18th Jul 2007
Ok, thanks Jim.......I'll look doing it another way.......you've saved me
from spinning my wheels trying to make this one work.

Vaya con Dios,
Chuck, CABGx3



"Jim Thomlinson" wrote:

> Neither InputBox nor Application.InputBox have any kind of validation or
> input mask so if you either have to validate the input after the fact or
> create a form with a text box to do what you want to do. My preference would
> be for the form but to each his own...
> --
> HTH...
>
> Jim Thomlinson
>
>
> "CLR" wrote:
>
> > Hi All........
> > I am using the following line to present the user with a opportunity to
> > input some data. I would like to accept 0, 1, or 2 characters and reject 3
> > or more characters for a re-do.....help please
> >
> > choice1 = InputBox("Enter PlannerCode to search for:")
> >
> > TIA
> > Vaya con Dios,
> > Chuck, CABGx3
> >
> >

 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      18th Jul 2007
Chuck,
Maybe this...

Sub WhoAreYou()
Dim choice1 As String
Dim strMsg As String
Do
choice1 = InputBox("Enter PlannerCode to search for:", "Chuck Wants to Know", strMsg)
If Len(choice1) < 3 Then Exit Do
strMsg = "One or two characters only"
Loop
If Len(choice1) = 0 Then
Exit Sub
End If
End Sub
'--
Regards,
Jim Cone


"CLR" <(E-Mail Removed)>
wrote in message
Hi All........
I am using the following line to present the user with a opportunity to
input some data. I would like to accept 0, 1, or 2 characters and reject 3
or more characters for a re-do.....help please

choice1 = InputBox("Enter PlannerCode to search for:")

TIA
Vaya con Dios,
Chuck, CABGx3


 
Reply With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      19th Jul 2007
BINGO JIM!!!!..........your code works like a champ. Sorry I didn't get back
sooner but I had a computer crash due to lightning yesterday just after you
posted and I didn't get to try it until this morning.......

Happy camper here...........thanks again

Vaya con Dios,
Chuck, CABGx3



"Jim Cone" wrote:

> Chuck,
> Maybe this...
>
> Sub WhoAreYou()
> Dim choice1 As String
> Dim strMsg As String
> Do
> choice1 = InputBox("Enter PlannerCode to search for:", "Chuck Wants to Know", strMsg)
> If Len(choice1) < 3 Then Exit Do
> strMsg = "One or two characters only"
> Loop
> If Len(choice1) = 0 Then
> Exit Sub
> End If
> End Sub
> '--
> Regards,
> Jim Cone
>
>
> "CLR" <(E-Mail Removed)>
> wrote in message
> Hi All........
> I am using the following line to present the user with a opportunity to
> input some data. I would like to accept 0, 1, or 2 characters and reject 3
> or more characters for a re-do.....help please
>
> choice1 = InputBox("Enter PlannerCode to search for:")
>
> TIA
> Vaya con Dios,
> Chuck, CABGx3
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to overcome Inputbox 255-char limit? John Svendsen Microsoft Excel Programming 3 3rd Nov 2008 10:22 PM
Msgbox if Inputbox entry contains character Steph Microsoft Excel Programming 1 23rd Jun 2005 06:02 PM
Limit text length with inputBox BigDave Microsoft Excel Programming 2 10th Jun 2005 07:11 PM
Inputbox and & character =?Utf-8?B?TUpS?= Microsoft Excel Programming 1 20th Oct 2004 11:13 PM
InputBox function - prompt string limit =?Utf-8?B?TWFyY290dGUgQQ==?= Microsoft Excel Programming 4 9th Jun 2004 09:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 PM.