Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VBScript Expected End 800A03F6

I am getting this error while trying to run a VBScript (note this is not in a web environment - just running a VBScript on Windows):

Line: [Last line]
Error: Expected 'End'
Code: 800A03F4
Source: Microsoft VBScript compilation error

I think it is an If statement that is not closed correctly with an "End If," but I've gone through every instance of "If" in the code and cannot find the error. Any tips or tools that could help me figure out where/why this error is occurring?

like image 523
GavinR Avatar asked Jun 22 '09 20:06

GavinR


2 Answers

In VBScript If is not the only token that requires an End. Also look for Function's and Sub's without their appropriate end statements.

like image 137
C. Ross Avatar answered Oct 13 '22 12:10

C. Ross


There was an "Else If" - there should be no space there: "Elseif"

http://www.w3schools.com/asp/asp_conditionals.asp

Hopefully this will help someone out in the future.

like image 22
GavinR Avatar answered Oct 13 '22 10:10

GavinR