View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Coco Coco is offline
external usenet poster
 
Posts: 34
Default declaring Arrays to use in a Form with few modules

How can I declare an Array in a form that will function as "Public". Those
arrays values can be updated for every modules that is called when this form
runs.?

I have an example:

This array will be like:

ReDim ErrorValue(1 To Len(myVal)) As String

*I need it PUBLIC because those array values are going to be updated in each
of the following functions:

function check4code1()
€¦
frmCheckCells.ErrorValue(k) ="Type 1" 'for check4code1
€¦
end function


function check4code2()
€¦
frmCheckCells.ErrorValue(k) ="Type 2" 'for check4code2
€¦
end function

€¦.and More functions€¦.


if no error is found then ErrorValue will be €œ€

Then, at the end of the process. The form will have a result like this

Sub searchX()
€¦
lbltxtErrorFound=ErrorValue(0) + ErrorValue(1) +ErrorValue(2)€¦€¦
€¦.

End sub


Can it be the best option ?

Thanks

Coco