Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Use spreadsheet cells for global variable space?

I have two large arrays of integers that I would like to initialize
when my workbook is opened. Since it seems too difficult
(and maybe impossible) to make these arrays global to ALL
of my VBA code modules, I thought of the following solution:

How about I create one hidden sheet in my workbook and
use the cells to simulate an array of data? If my data is stored
in a hidden sheet, that sheet could be easily accessed by ANY
of my VBA modules.

Any comments or suggestions???


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Use spreadsheet cells for global variable space?

Hi Robert,

I have always found it to be a very successful method. You can also set up
your system so that Administrators with the correct password can make
modofications. However, consider very hidden code so that the worksheet
cannot be unhidden in the user interface mode.

Example hiding.
Sheets("Sheet2").Visible = xlVeryHidden

Can only unhide with code as follows.
Sheets("Sheet2").Visible = True

--
Regards,

OssieMac


"Robert Crandal" wrote:

I have two large arrays of integers that I would like to initialize
when my workbook is opened. Since it seems too difficult
(and maybe impossible) to make these arrays global to ALL
of my VBA code modules, I thought of the following solution:

How about I create one hidden sheet in my workbook and
use the cells to simulate an array of data? If my data is stored
in a hidden sheet, that sheet could be easily accessed by ANY
of my VBA modules.

Any comments or suggestions???


.

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
global variable not seen Scott Excel Programming 1 July 4th 07 04:11 PM
Global Variable Francis Brown Excel Programming 4 November 27th 05 06:38 PM
Global Variable Patrick Simonds Excel Programming 8 October 6th 05 12:39 AM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Global variable Don[_11_] Excel Programming 1 October 28th 03 04:15 AM


All times are GMT +1. The time now is 09:11 AM.

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

About Us

"It's about Microsoft Excel"