Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I'm trying to add time differences in h:mm:ss, but SUM won't work | Excel Discussion (Misc queries) | |||
Subtracting Dates to get total time work time excluding weekends | Excel Discussion (Misc queries) | |||
Time Formatting Does Not Work for me | Excel Discussion (Misc queries) | |||
Match doesn't work all the time? | Excel Discussion (Misc queries) | |||
Why doesn't the DDB function work all the time? | Excel Worksheet Functions |