Klash Ville
Board Regular
- Joined
- Sep 19, 2017
- Messages
- 83
For some reason, the code below, only the first variable ( i ) works, while the other one ( o ) doesn't, is simply ignored.
All I want to do is check if 2 sheets are empty or not (with no written cells).
All I want to do is check if 2 sheets are empty or not (with no written cells).
Code:
For i = 1 To Worksheets.Count
If Worksheets(i).Name = "Feuil1" Then
exists = True
End If
Next i
If Not exists Then
MsgBox "Apparently the sheet where you were suppose to upload an example of (Feuil1) doesn't exist" & vbNewLine & vbNewLine & _
"• This is because it was either deleted or renamed into something different than its original name...", vbExclamation
Sheets("Parameters").Select
Exit Sub
End If
For o = 1 To Worksheets.Count
If Worksheets(o).Name = "Country" Then
exists = True
End If
Next o
If Not exists Then
MsgBox "Apparently the sheet where you were suppose to upload an example of (Country) doesn't exist" & vbNewLine & vbNewLine & _
"• This is because it was either deleted or renamed into something different than its original name...", vbExclamation
Sheets("Parameters").Select
Exit Sub
End If
Last edited: