Wilconcl51
New Member
- Joined
- Oct 10, 2023
- Messages
- 26
- Office Version
- 2016
- Platform
- Windows
Here is my code. Error message "Loop Without Do ??"
I'm confused
Sub Tuesday_Single()
Dim rVillaNo As Range
Dim Resp As String
Dim Meal As String
Dim GFO As String
Dim Msg, Style, Title, Help, Ctxt, Response, MyString As String
Dim Check As Boolean
Do
Resp = InputBox("What is their Villa Number. Villa Number only?. ")
'Application.ScreenUpdating = False
If Len(Resp) > 0 Then
On Error Resume Next
Set rVillaNo = Range("VillaNo").Find(What:=Resp, LookAt:=xlWhole)
On Error GoTo 0
If Not rVillaNo Is Nothing Then Application.Goto Reference:=rVillaNffset(, -5), Scroll:=True
End If
Meal = InputBox("Enter 1 or 2 if they are attending")
ActiveCell = Meal
ActiveCell.Offset(0, 4).Select
GFO = InputBox("Input Y or YY for Gluten Free or Enter")
ActiveCell = GFO
Check = (MsgBox("Do you want to add more ?", vbYesNo) = vbYes)
If Check = vbYes Then
Loop
Sheets("Menu").Select
End If
'Application.ScreenUpdating = True
End Sub
I'm confused
Sub Tuesday_Single()
Dim rVillaNo As Range
Dim Resp As String
Dim Meal As String
Dim GFO As String
Dim Msg, Style, Title, Help, Ctxt, Response, MyString As String
Dim Check As Boolean
Do
Resp = InputBox("What is their Villa Number. Villa Number only?. ")
'Application.ScreenUpdating = False
If Len(Resp) > 0 Then
On Error Resume Next
Set rVillaNo = Range("VillaNo").Find(What:=Resp, LookAt:=xlWhole)
On Error GoTo 0
If Not rVillaNo Is Nothing Then Application.Goto Reference:=rVillaNffset(, -5), Scroll:=True
End If
Meal = InputBox("Enter 1 or 2 if they are attending")
ActiveCell = Meal
ActiveCell.Offset(0, 4).Select
GFO = InputBox("Input Y or YY for Gluten Free or Enter")
ActiveCell = GFO
Check = (MsgBox("Do you want to add more ?", vbYesNo) = vbYes)
If Check = vbYes Then
Loop
Sheets("Menu").Select
End If
'Application.ScreenUpdating = True
End Sub