Results 1 to 3 of 3

Thread: [2005] 'As' Clause Error...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    170

    [2005] 'As' Clause Error...

    I have purchased a 3rd party control, and in the manual it has told me to use the following code:

    Code:
    Const AP_PROP_OUTDIR = 1
    However this code is giving a warning in Visual Studio of:

    Variable declaration without 'As' clause; type of Object assumed
    I assume that this is VB code and not VB.Net code, however I am uncertain how to resolve this error.

    Sorry for something that is probably a simple fix.

    Thanks in advance

    Simon

  2. #2
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: [2005] 'As' Clause Error...

    Depending on what the constant "should" be declared as. You could try:

    Code:
    Const AS_PROP_OUTDIR As Integer = 1

  3. #3
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Boston, MA
    Posts
    391

    Re: [2005] 'As' Clause Error...

    NetNinja is right that would most likely not cause you any problems.

    As far as the message is concerned you probably have the "Implicit type; object assumed" flag set to warning on your project compiler properties. That gives you a warning in cases like this. You can set it to "none" if you don't want to see when the compiler is guessing the object type.

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