Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing data between worksheets JessJohns Excel Worksheet Functions 1 December 27th 07 07:03 PM
Array Formula : Problems with sharing workbook Ola2B Excel Discussion (Misc queries) 1 February 28th 07 01:50 PM
Multi sharing and saving between worksheets Taz Excel Discussion (Misc queries) 0 April 27th 06 11:26 AM
Sharing Data Between Worksheets spartikus New Users to Excel 2 March 10th 06 01:45 AM
sharing totals between worksheets ~*~ Twinkle~*~ New Users to Excel 1 September 6th 05 08:00 AM


All times are GMT +1. The time now is 11:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"