View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Global Variables

Joe is correct. If you just DIM them outside the procedures of a module,
then they are by default private and only the procedures within that module
can "see" them.

By Declaring the PUBLIC, all procedures in all modules can see them.
--
Gary''s Student


"Joe Fish" wrote:

Now that I'm thinking of it, I'm pretty certain it has to be before the
first procedure in a module. So actually, it's more like:

Public rng As Range

Set rng = Range("A1")

Sub MooCow ()
'blah blah blah
End Sub