Option Explicit Error

Results 1 to 3 of 3

Thread: Option Explicit Error

  1. #1
    Daniel Guest

    Default Option Explicit Error

    Hi,<BR>I wanted to follow 4Guys coding tip and wrote the following line at the beginning of my ASP file:<BR>&#060;%Option Explicit%&#062;<BR><BR>And got the following error:<BR>Microsoft VBScript compilation error &#039 800a0400&#039 <BR><BR>Expected statement <BR><BR>/LearnNet/Herramientas/Navbar.asp, line 5 <BR><BR>Option Explicit<BR>^<BR><BR>Please help me, what could be the problem?

  2. #2
    Join Date
    Dec 1969

    Default RE: Option Explicit Error

    Option Explicit must be the FIRST LINE of VBS code on a page.<BR><BR>And it can NOT come from an INCLUDED file, because by definition the included file is not the first thing on a page.<BR><BR>I would guess, from the name of your file, that it is an included file. Sorry. Won&#039t work.<BR><BR>

  3. #3
    Panos Barbalias Guest

    Default RE: Option Explicit Error

    I would suggest first of all to move the Option Explicit in the second line of your ASP, after Language=VBScript..<BR>And give him his own &#060;% %&#062; tags..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts