I am now getting a compile error Next without For. Here is what my code looks like now, can you point the error?

Declare Function EssMenuVRetrieve Lib "ESSEXCLN.XLL" () As Long
Sub loop_all_sheets()
Num_Sheets = Application.Sheets.Count

For y = 1 To Num_Sheets
If Sheets(y).Name <> "Lookup" Then
Sheets(y).Select
x = EssMenuVRetrieve
Sheets().Select
Next

End Sub