Search notes:

VBA: vba6 and vba7 predefined compiler directive constants

The predefined compiler constants vba6 and vba7 allow to determine if a VBA environment is compatible to the VBA specification 6 or 7.
If vba7 is true, it implies that vba6 is also true.
option explicit

sub main() ' {

    #if vba6 then
        debug.print "vba6 is defined"
    #else
        debug.print "vba6 is not defined"
    #end if

    #if vba7 then
        debug.print "vba7 is defined"
    #else
        debug.print "vba7 is not defined"
    #end if

end sub ' }
Github repository about-VBA, path: /compiler-directives/vbaX/vba-version.bas
The vba7 constant is especially useful for the conditionally declaring functions with ptrSafe.

See also

Conditional compilation in VBA

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...', 1759391079, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/VBA/compiler-directives/vbaX/index(63): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78