Check for diskette in A: drive

  • Thread starter Thread starter Phil Hellmuth
  • Start date Start date
P

Phil Hellmuth

Is there VBA code that will allow me to test whether or not there's a
diskette in the A: drive? Thanks in advance.
 
The example he points you to is what you want, but I know when I declare my
FileSystemObject I don't use 'Dim FSO as Scripting.FileSystemObject', I just
use 'Dim FSO as FileSystemObject'. And like the comment in the example says,
you have to add a reference to the Script library via the VBA editor. On my
version of Access it's called Microsoft Script Host Object Model - it may
differ depending on the version you're using. If you haven't added a refernce
before, you go into the VBA editor, click Tools, then References, then scroll
down to where the scripting library name is and click on it - make sure the
check box is checked. Then do a compile.
 
Back
Top