hotpepper,
i actually tried to put
intposition = 0
but I still had the same error.....
Invalid call, procedure, or arguement
that refers to
strFirst = Left(strFull, intPosition - 1)
THIS IS WHAT I HAVE SO FAR!
strFull = InputBox(prompt:="Please Enter the Patient's Name", Title:="Name Information")
intPosition = InStr(strFull, " ")
strFirst = Left(strFull, intPosition - 1)
strLast = Mid(strFull, intPosition + 1)
If strFull = strFirst & "" & strLast Then
intButton = MsgBox(prompt:="Name Was Entered Incorrectly!", Buttons:=vbRetryCancel + vbExclamation, _
Title:="ERROR!!!")
Else
intButton = MsgBox(prompt:="Name Was Entered.", Buttons:=vbOKOnly, Title:="YIPPY!!!")
End If
Select Case intButton
Case vbRetry
strFull = InputBox(prompt:="Enter Patient's First and Last Name", _
Title:="Name Information")
Case vbCancel
MsgBox prompt:="No Name Was Entered!"
End Select
shtPatients.Range("A8").Value = strLast
shtPatients.Range("B8").Value = strFirst
BUT
like I said if I input say "FULL NAME" it works great! but if I input
"FULLNAME" it goes to debugging and says
Invalid call, procedure, or arguement
that refers to
strFirst = Left(strFull, intPosition - 1)
I have to prompt for a which is assumed to be entered as first name followed by last name with a single space in between.
if there is NO SPACE in what was entered, then I have to issue an error message and reprompt.
then if the cancel button is clicked then I have to exit the procedure without entering any data into the worksheet.
Is this maybe clearer?
Thanks!
Please help!
I have been working on this for days!