LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Updating public array within a form


I had a Dim statement within my master code which seemed to be overriding
the public statement.


What you have encountered is an illustration of a programming concept
known as "scope". See http://www.cpearson.com/Excel/Scope.aspx for a
full discussion as it applies to variables, classes, and procedures.

Cordially,
Chip Pearson
Microsoft MVP
Excel 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Fri, 13 Nov 2009 07:17:02 -0800, Paul
wrote:

Mike

I've found it !!

I had a Dim statement within my master code which seemed to be overriding
the public statement.

Remove the DIM and all is well.

Thanks anyway for taking the time

"Mike H" wrote:

Paul,

As usual, post your code.

Mike

"Paul" wrote:

I have a form that requires user input to a number of boxes.

As each is updated I would like to update the array element to which it
relates.

I have stated my array as public in the code that calls the userform, but as
soon as I'm in form code I get a 'Subscript out of range' error.

Any ideas where I'm going wrong ?



 
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
Maintaing public array values in a user form Chet Excel Programming 1 October 4th 08 01:04 AM
Public array bobbo Excel Programming 1 October 17th 06 07:06 PM
Public Array in a form? lux770[_3_] Excel Programming 4 July 28th 05 08:49 AM
public array Circe[_2_] Excel Programming 6 May 17th 05 11:45 PM
Public Array Brent McIntyre Excel Programming 5 September 23rd 03 12:53 AM


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