You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
It is declaring a variable to be accessible to all code modules.
Not sure where you have got this because VBA nowadays uses Public instead, which allows a variable to be accessible to all code modules including those in other running Office applications.
Alternatives are Dim which makes a variable available in current module or subroutine, and Private.
-----------------------
Regards BrianB
Most problems occur from starting at the wrong place.
Use a cup of coffee to make Windows run faster.
It is easy until you know how.
if you look at the object browser in the VBEditor, and search for Global, it returns some gubbin's about userforms, I cant see how it relates to your situation though so this might be more of a red herring!