Search notes:

VBA: global variables

At module-level, a variable can be declared using the global statement. Such a variable is accessible from other modules as well:
option explicit

global g_foo as long

sub doSomething
    …
end sub

…
The value of a global variable is not destroyed when a program ends normally. However, the end statement destroys global variables, see here.

See also

Variables 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...', 1745434801, '3.149.249.140', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/VBA/language/variables/global/index(48): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78