View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Is the floppy in the A drive?

Jim,

Both Dave's methods worked for me in Win98 / XL2000

If you uncomment the first pair you need to comment the second pair AND set
a reference to Microsoft Scripting Runtime, the way Dave described.

Regards,
Peter


"jim simpson" wrote in message
news:xX%pd.2784$QR.1669@lakeread01...
Thanks to both Tim and Dave for responding.

Dave sometning doesn't work with the top lines of each pair commented out.

I
get a complaint about "ScriptingFileSystemObject". It says "User defined
type not defined". I'm using Excel 2000 with Win98, could that be the
problem?

Jim


"Dave Peterson" wrote in message
...
Another option:

Option Explicit
Sub testme03()

'Dim FSO As Scripting.FileSystemObject
Dim FSO As Object

'Set FSO = New Scripting.FileSystemObject
Set FSO = CreateObject("scripting.filesystemobject")

With Application
If FSO.Drives("a").IsReady Then
MsgBox "ok"
Else
MsgBox "not ready"
End If
End With
End Sub


If you uncommment the top lines of each pair (and comment the bottom),

you'll
have to set a reference (tools|references) to Microsoft Scripting

Runtime.

When you have that reference set, you'll get the VBE's intellisense to

help you
complete your code.



jim simpson wrote:

I would like to determine if the floppy in the "A" drive and if it is

post a
msgbox saying so. I have not been able to do this and haven't seen any
messages on the subject.

Can someone please help me?.
Thanks

Jim


--

Dave Peterson