+ Reply to Thread
Results 1 to 3 of 3

Environ Library Not Working on Excel 2000

  1. #1
    Stefan_B
    Guest

    Environ Library Not Working on Excel 2000

    Hello,

    I'm attempting to execute the following line on Excel 2000 and I'm receiving
    the error message:

    'Compile Error: Can't find project or library'

    The code I'm attempting to execute is:

    Username = Environ ("Username")

    Does anyone have any ideas? The code works in Excel 2003, which is a bit
    weird.

    Many Thanks,
    Stefan.



  2. #2
    keepITcool
    Guest

    Re: Environ Library Not Working on Excel 2000


    it's a standard vba function.
    this may be indicative of an (unrelated) reference that's missing.

    check tools/references for activated references which have "MISSING"




    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    Stefan_B wrote :

    > Hello,
    >
    > I'm attempting to execute the following line on Excel 2000 and I'm
    > receiving the error message:
    >
    > 'Compile Error: Can't find project or library'
    >
    > The code I'm attempting to execute is:
    >
    > Username = Environ ("Username")
    >
    > Does anyone have any ideas? The code works in Excel 2003, which is a
    > bit weird.
    >
    > Many Thanks,
    > Stefan.


  3. #3
    Harald Staff
    Guest

    Re: Environ Library Not Working on Excel 2000

    Hi Stefan

    No that is not weird. There are things in Excel 2003 that one couldn't even
    imagine back when Excel 2000 was made, you can't expect her to handle those.
    Always develop in the oldest version, or you are working blindfolded.

    The error is usually a wrong reference. In the VB editor, Tools >
    References, if you find some marked Missing, unselect those.

    ENVIRON is OS dependant. It works very different in the Windows 9x family
    from the Windows NT family and shouldn't therefore be used for
    cross-platform applications.

    HTH. Best wishes Harald

    "Stefan_B" <[email protected]> skrev i melding
    news:[email protected]...
    > Hello,
    >
    > I'm attempting to execute the following line on Excel 2000 and I'm

    receiving
    > the error message:
    >
    > 'Compile Error: Can't find project or library'
    >
    > The code I'm attempting to execute is:
    >
    > Username = Environ ("Username")
    >
    > Does anyone have any ideas? The code works in Excel 2003, which is a bit
    > weird.
    >
    > Many Thanks,
    > Stefan.
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1