+ Reply to Thread
Results 1 to 5 of 5

Doesn't work all the time

Hybrid View

Guest Doesn't work all the time 01-30-2006, 03:15 PM
Guest Re: Doesn't work all the time 01-30-2006, 03:45 PM
Guest Re: Doesn't work all the time 01-30-2006, 03:50 PM
Guest Re: Doesn't work all the time 01-30-2006, 05:10 PM
Guest Re: Doesn't work all the time 01-30-2006, 05:45 PM
  1. #1
    Alex St-Pierre
    Guest

    Doesn't work all the time

    Hi,
    I have tried this and boolExist takes the value of true (doesn't work all
    the time)
    I have also try the cbool and doesn't work on excel 2002. I tried Cbool with
    excel 2003 and it work's well.. It's very strange..

    dim fso
    set fso = createobject("scripting.flesystemobject")
    boolExist = fso.fileexists("V:") (takes value true ??)
    set fso = nothing
    --
    Alex St-Pierre

  2. #2
    Kris
    Guest

    Re: Doesn't work all the time

    Alex St-Pierre wrote:
    > Hi,
    > I have tried this and boolExist takes the value of true (doesn't work all
    > the time)
    > I have also try the cbool and doesn't work on excel 2002. I tried Cbool with
    > excel 2003 and it work's well.. It's very strange..
    >
    > dim fso
    > set fso = createobject("scripting.flesystemobject")
    > boolExist = fso.fileexists("V:") (takes value true ??)
    > set fso = nothing




    You lost "i" in set fso = createobject("scripting.flesystemobject")

  3. #3
    Ed
    Guest

    Re: Doesn't work all the time

    When you say "It doesn't work", what are you seeing? An error message?
    Or just a False value?
    Why don't you have
    Dim boolExist As Boolean ? What is Cbool?
    Is your network connection to your V: drive constant, or does it reconnect
    every time it's called?
    Are Excel 2002 and Excel 2003 on the same machines? Do both instances
    have references to the Microsoft Scripting Runtime library?

    Ed

    "Alex St-Pierre" <AlexStPierre@discussions.microsoft.com> wrote in message
    news:6A5A6C56-31F0-4DA5-A0A0-37AC7421D54B@microsoft.com...
    > Hi,
    > I have tried this and boolExist takes the value of true (doesn't work all
    > the time)
    > I have also try the cbool and doesn't work on excel 2002. I tried Cbool

    with
    > excel 2003 and it work's well.. It's very strange..
    >
    > dim fso
    > set fso = createobject("scripting.flesystemobject")
    > boolExist = fso.fileexists("V:") (takes value true ??)
    > set fso = nothing
    > --
    > Alex St-Pierre




  4. #4
    Dave Peterson
    Guest

    Re: Doesn't work all the time

    If you're looking for a drive, don't you want driveexists?

    Dim BoolExist As Boolean
    Dim FSO As Object
    Set FSO = CreateObject("scripting.filesystemobject")
    BoolExist = FSO.DriveExists(drivespec:="v")
    MsgBox BoolExist



    Alex St-Pierre wrote:
    >
    > Hi,
    > I have tried this and boolExist takes the value of true (doesn't work all
    > the time)
    > I have also try the cbool and doesn't work on excel 2002. I tried Cbool with
    > excel 2003 and it work's well.. It's very strange..
    >
    > dim fso
    > set fso = createobject("scripting.flesystemobject")
    > boolExist = fso.fileexists("V:") (takes value true ??)
    > set fso = nothing
    > --
    > Alex St-Pierre


    --

    Dave Peterson

  5. #5
    Alex St-Pierre
    Guest

    Re: Doesn't work all the time

    Thank Dave..
    What I did wrong is the following:

    Dim FSO As Object
    Set FSO = CreateObject("scripting.filesystemobject")
    if FSO.DriveExists(drivespec:="v") = true then ...
    MsgBox BoolExist
    endif
    So, I though FSO.Drive was true because the condition is satisfied.
    By declaring a Boolean, I see that the result is false !!
    --
    Alex St-Pierre


    "Dave Peterson" wrote:

    > If you're looking for a drive, don't you want driveexists?
    >
    > Dim BoolExist As Boolean
    > Dim FSO As Object
    > Set FSO = CreateObject("scripting.filesystemobject")
    > BoolExist = FSO.DriveExists(drivespec:="v")
    > MsgBox BoolExist
    >
    >
    >
    > Alex St-Pierre wrote:
    > >
    > > Hi,
    > > I have tried this and boolExist takes the value of true (doesn't work all
    > > the time)
    > > I have also try the cbool and doesn't work on excel 2002. I tried Cbool with
    > > excel 2003 and it work's well.. It's very strange..
    > >
    > > dim fso
    > > set fso = createobject("scripting.flesystemobject")
    > > boolExist = fso.fileexists("V:") (takes value true ??)
    > > set fso = nothing
    > > --
    > > Alex St-Pierre

    >
    > --
    >
    > Dave Peterson
    >


+ 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