Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default 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   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm trying to add time differences in h:mm:ss, but SUM won't work Emily Excel Discussion (Misc queries) 4 August 27th 09 09:05 PM
Subtracting Dates to get total time work time excluding weekends Jon Ratzel[_2_] Excel Discussion (Misc queries) 2 January 31st 08 10:36 PM
Time Formatting Does Not Work for me John E. Golden Excel Discussion (Misc queries) 7 July 30th 07 06:45 PM
Match doesn't work all the time? PaulW Excel Discussion (Misc queries) 6 December 1st 06 05:05 PM
Why doesn't the DDB function work all the time? Pileski Excel Worksheet Functions 2 February 28th 06 09:44 PM


All times are GMT +1. The time now is 10:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"