Cactus,
There are a lot of possible answers to your question. Some possibilities:
If it's variables (including arrays), you can put them in any module ahead
of the subs and functions (module level), like:
Public x as integer (or other data type (string, long, single, etc.)
Public MA(5,5) as string
The variables are accessible from any module now (Public).
You said something about using a function. If you want to call a function to
get your common data, define it:
Public GetMyCommonData(x, y, etc) as string, (or other data type)
code to get the data
end Function
Now the function is public (you can call it from any module to get the
data). The data it retrieves could module-level variables, as above, or the
function could get the data from a file, a worksheet, or kept in static
variables in the function.
A worksheet might be a good place to keep the data, particularly if it's
table type data. It gets saved when the workbook is saved, unlike
variables, which are lost. Any code in any module can get to it. The sheet
can be made veryhidden, so that a user can't unhide and see the sheet. Do
this with the Properties window with the sheet selected, or in code:
Worksheets("Common Data").Visible = xlVeryHidden