LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Help me understanding variable scope

I create a public array defined on top of the macro to be global in 1 of the
worksheet. The array contains a range of a worksheet. I have a procedure
called by a checkbox_click routine to see if a readflag is true to skip
loading the range into the global array so that it doesn't keep reading every
single time. My problem is that once the procedure is ran by the click
routine, the global array content disappears. What can I do to keep the value
intact once the array is loaded? Another thought is to verify if the global
array has any values in it but since I define the array as variant, it
doesn't exist when it's not loaded. Is there a function in VBA that allows me
to check if an array is defined?

Thanks
 
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
Scope of variable avi Excel Programming 2 April 12th 07 09:02 AM
UNDERSTANDING VARIABLE SCOPE -JEFF-[_2_] Excel Programming 9 August 24th 05 10:25 PM
variable scope mgasparel Excel Programming 2 February 16th 05 05:22 PM
Variable Scope Kevin Excel Programming 1 September 14th 04 07:05 PM
Variable scope TonyM Excel Programming 5 April 24th 04 01:02 PM


All times are GMT +1. The time now is 10:33 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"