If the Input Entry is a "C" or a "H" then True, otherwise all other entries are False. Even though I Type "C" or "c" it keeps going into a loop. Where am I going wrong? I even tried changing Do While phonetype <> "C" And phonetype <> "c"
Dim phonetype As String
Do While phonetype <> "C" Or _
phonetype <> "c" Or _
phonetype <> "H" Or _
phonetype <> "h" Or _
phonetype = NullString Or _
phonetype = "Select Letter"
phonetype = InputBox(Prompt:="Which Number do you wish to provide Cell or Home ? " _
& vbNewLine & vbNewLine & "SELECT Letter" & vbNewLine _
& vbNewLine & "C = Cell Phone " & vbNewLine _
& vbNewLine & "H = Home Phone" & vbNewLine, _
Title:="ROOM TYPE", Default:="Select Letter")
MsgBox (phonetype & " " & " This is the first MSGBOX")
phonetype = phonetype
MsgBox (phonetype & " " & " This is the 2nd MSGBOX")
MsgBox (" You MUST select a Letter ! ")
Loop
Select Case phonetype
Case "C", "c"
'Input Cell Phone
mycell.Select 'currently sitting at the zipcode cell
ActiveCell.Offset(2, 0).Select
Set mycell = ActiveCell.Offset(0, 0) 'currently sitting at the Cell Phone cell
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
mycell.Value = InputBox("what is the Guest CELL Phone? ", _
Title:="CELL-PHONE", Default:=mycell.Value)
phonetype = MsgBox(Prompt:="Does the customer want to provide Home Number ?", _
Buttons:=vbYesNo)
If phonetype = vbYes Then
ActiveCell.Offset(-1, 0).Select
Set mycell = ActiveCell.Offset(0, 0) 'currently sitting at the Home Phone cell
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
mycell.Value = InputBox("what is the Guest Home Phone? ", _
Title:="HOME-PHONE", Default:=mycell.Value)
'ActiveCell.Offset(1, 0).Show
ActiveCell.Offset(1, 0).Select
Set mycell = ActiveCell.Offset(0, 0) '
MsgBox (mycell.Value & "Not Sure where I am at")
Else
GoTo DL:
End If
Case "H", "h"
'Input Home Phone
mycell.Select 'currently sitting at the zipcode cell
ActiveCell.Offset(1, 0).Select
Set mycell = ActiveCell.Offset(0, 0) 'currently residing at the home phone cell
'MsgBox (mycell.Value & " Should be Home Number")
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
mycell.Value = InputBox("what is the Guest Home Phone? ", _
Title:="HOME-PHONE", Default:=mycell.Value)
phonetype = MsgBox(Prompt:="Does the customer want to provide Cell Number ?", _
Buttons:=vbYesNo)
If phonetype = vbYes Then
ActiveCell.Offset(1, 0).Select
Set mycell = ActiveCell.Offset(0, 0) 'currently sitting at the Cell Phone cell
'MsgBox (mycell.Value & "The Customer said yes to provide cell # after givng home number")
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
mycell.Value = InputBox("what is the Guest CELL Phone? ", _
Title:="CELL-PHONE", Default:=mycell.Value)
Else
Set mycell = ActiveCell.Offset(1, 0) ' currently residing at the cell phone cell
'MsgBox (mycell.Value & " Customer decided not to give cell number after getting home number")
ActiveCell.Offset(1, 0).Select
End If
End Select
Dim phonetype As String
Do While phonetype <> "C" Or _
phonetype <> "c" Or _
phonetype <> "H" Or _
phonetype <> "h" Or _
phonetype = NullString Or _
phonetype = "Select Letter"
phonetype = InputBox(Prompt:="Which Number do you wish to provide Cell or Home ? " _
& vbNewLine & vbNewLine & "SELECT Letter" & vbNewLine _
& vbNewLine & "C = Cell Phone " & vbNewLine _
& vbNewLine & "H = Home Phone" & vbNewLine, _
Title:="ROOM TYPE", Default:="Select Letter")
MsgBox (phonetype & " " & " This is the first MSGBOX")
phonetype = phonetype
MsgBox (phonetype & " " & " This is the 2nd MSGBOX")
MsgBox (" You MUST select a Letter ! ")
Loop
Select Case phonetype
Case "C", "c"
'Input Cell Phone
mycell.Select 'currently sitting at the zipcode cell
ActiveCell.Offset(2, 0).Select
Set mycell = ActiveCell.Offset(0, 0) 'currently sitting at the Cell Phone cell
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
mycell.Value = InputBox("what is the Guest CELL Phone? ", _
Title:="CELL-PHONE", Default:=mycell.Value)
phonetype = MsgBox(Prompt:="Does the customer want to provide Home Number ?", _
Buttons:=vbYesNo)
If phonetype = vbYes Then
ActiveCell.Offset(-1, 0).Select
Set mycell = ActiveCell.Offset(0, 0) 'currently sitting at the Home Phone cell
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
mycell.Value = InputBox("what is the Guest Home Phone? ", _
Title:="HOME-PHONE", Default:=mycell.Value)
'ActiveCell.Offset(1, 0).Show
ActiveCell.Offset(1, 0).Select
Set mycell = ActiveCell.Offset(0, 0) '
MsgBox (mycell.Value & "Not Sure where I am at")
Else
GoTo DL:
End If
Case "H", "h"
'Input Home Phone
mycell.Select 'currently sitting at the zipcode cell
ActiveCell.Offset(1, 0).Select
Set mycell = ActiveCell.Offset(0, 0) 'currently residing at the home phone cell
'MsgBox (mycell.Value & " Should be Home Number")
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
mycell.Value = InputBox("what is the Guest Home Phone? ", _
Title:="HOME-PHONE", Default:=mycell.Value)
phonetype = MsgBox(Prompt:="Does the customer want to provide Cell Number ?", _
Buttons:=vbYesNo)
If phonetype = vbYes Then
ActiveCell.Offset(1, 0).Select
Set mycell = ActiveCell.Offset(0, 0) 'currently sitting at the Cell Phone cell
'MsgBox (mycell.Value & "The Customer said yes to provide cell # after givng home number")
Selection.NumberFormat = "[<=9999999]###-####;(###) ###-####"
mycell.Value = InputBox("what is the Guest CELL Phone? ", _
Title:="CELL-PHONE", Default:=mycell.Value)
Else
Set mycell = ActiveCell.Offset(1, 0) ' currently residing at the cell phone cell
'MsgBox (mycell.Value & " Customer decided not to give cell number after getting home number")
ActiveCell.Offset(1, 0).Select
End If
End Select