Search notes:

VBA function: dir

dir
dir(pathname)
dir(pathname, attributes)

attributes

The value of attributes is combination of the following constants:
vbNormal 0
vbReadOnly 1
vbHidden 2
vbSystem 4
vbVolume 8
vbDirectory 16
vbAlias 64

Determine if file exists

dir(filename) can be used to check if the file whose name is filename exists. If the file does not exists, dir(filename) returns a non empty string:
if dir(filename) <> "" then
  '
  ' file exists, do something with it
  '
    doStuff filename

end if

See also

VBA functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758194006, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/VBA/functions/dir(65): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78