Results 1 to 3 of 3

Thread: [RESOLVED] 'Require Variable Declaration' bug

  1. #1

    Thread Starter
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Resolved [RESOLVED] 'Require Variable Declaration' bug

    I just noticed a strange little thing in VB6 IDE. Did some quick Google searching but couldn't find any mention of it.

    I, of course, as soon as I install VB6 go to Tools > Options and turn on "Require Variable Declaration" that forces the IDE to auto-add the Option Explicit statement to beggining of each Form, Module...

    And that works fine if I go to New Project > Standard Exe. But if I choose 'VB Enterprise Edition Controls' from the New Project window/wizard, then open Form1 code, Option Explicit is not there. If I add a module or a new form to the project however, it does get added. Starting a fresh project like that I also checked the option in Tools > Options, and it is still turned on. No sign of Option Explicit in Form1 though.

    Can anyone else replicate this or is it just happening to me?

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: 'Require Variable Declaration' bug

    You are not alone. It should be happening to everyone.

    The files for each project type are located in the following folder

    C:\Program Files\Microsoft Visual Studio\VB98\Template\Projects

    After opening/creating a new VB Enterprise Controls project, add Option Explicit to Form1 and then save the changes back to the above folder.

    You can create your own Template by starting a new project, adding everything you typically want and save all files to the above folder. Next time you start a project you template will be listed.
    Last edited by brucevde; May 20th, 2010 at 12:48 AM.

  3. #3

    Thread Starter
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: 'Require Variable Declaration' bug

    Excellent info! Thanks.

Posting Permissions

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



Click Here to Expand Forum to Full Width