Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sharing an array between worksheets
Hi
I have a module which runs when a sheet is opened. That gets some information and then populates an array (defined as public within the module). That all works fine, but if I try to access the contents of the array from any of the subsequent sheets, I get an error saying an array was expected. Why can't the sheets see it even though it's defined as public in the module? Thanks for your replies. Peter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sharing an array between worksheets
If I follow you, it seems that you're setting a public variable in a sheet
module and finding that it cannot be seen from outside of it. If that's the case it's because code in other modules will not search sheet modules for variables (unlike standard modules), but it will find them if you point specifically to them, by, for example, using "Sheet1.MyVar" instead of just "MyVar". -- Jim Rech Excel MVP "Peter" wrote in message ... | Hi | | I have a module which runs when a sheet is opened. That | gets some information and then populates an array (defined | as public within the module). That all works fine, but if | I try to access the contents of the array from any of the | subsequent sheets, I get an error saying an array was | expected. Why can't the sheets see it even though it's | defined as public in the module? | | Thanks for your replies. | | Peter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sharing data between worksheets | Excel Worksheet Functions | |||
Array Formula : Problems with sharing workbook | Excel Discussion (Misc queries) | |||
Multi sharing and saving between worksheets | Excel Discussion (Misc queries) | |||
Sharing Data Between Worksheets | New Users to Excel | |||
sharing totals between worksheets | New Users to Excel |