Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
255 Character Limit | Excel Discussion (Misc queries) | |||
Msgbox if Inputbox entry contains character | Excel Programming | |||
Limit text length with inputBox | Excel Programming | |||
Inputbox and & character | Excel Programming | |||
InputBox function - prompt string limit | Excel Programming |