P
Patrick C. Simonds
Per Jessen has provided me with a great deal of help, and one of the thinks
he has helped me with is to use an array of ranges not separate variables.
Among the lines of code he has provided one was:
Dim rngArr() As Range
It became apparent in the course of my work that I would need to refer to
that array in additional modules that were called from the userform in which
rngArr() As Range dimensioned. He told me to declare rngArr() As Range as
public and outside the module. By outside the module I assumed that to mean
that the line Public rngArr() As Range should be placed above all other
code for the userform (before the first sub routine).
I have done that but get the following error message:
Compile Error
Constants, fixed-length strings, arrays, user-defined types and Declare
Statements not allowed as Public members or object modules
So is there any way in which to declare this array as Public? Below is
everything I am declaring (what I believe to be outside the module) above
the first sub routine.
Option Explicit
Dim rMyCell As Range
Public rng As Range
Dim c As Range
Dim Counter As Long
Dim myRng As Range
Dim my1Rng As Range
Public MissData As Boolean
Public BlkProc As Boolean
Private Sub ComboBox1001_Change()
he has helped me with is to use an array of ranges not separate variables.
Among the lines of code he has provided one was:
Dim rngArr() As Range
It became apparent in the course of my work that I would need to refer to
that array in additional modules that were called from the userform in which
rngArr() As Range dimensioned. He told me to declare rngArr() As Range as
public and outside the module. By outside the module I assumed that to mean
that the line Public rngArr() As Range should be placed above all other
code for the userform (before the first sub routine).
I have done that but get the following error message:
Compile Error
Constants, fixed-length strings, arrays, user-defined types and Declare
Statements not allowed as Public members or object modules
So is there any way in which to declare this array as Public? Below is
everything I am declaring (what I believe to be outside the module) above
the first sub routine.
Option Explicit
Dim rMyCell As Range
Public rng As Range
Dim c As Range
Dim Counter As Long
Dim myRng As Range
Dim my1Rng As Range
Public MissData As Boolean
Public BlkProc As Boolean
Private Sub ComboBox1001_Change()