D
David F. Schrader
I have a question about working with arrays. It's a rather an
obtuse kind of question, dealing with manipulating them while
passing them into "functions" and "subroutines" to be evaluated
with the result either stored in another cell or the color of
a cell changed to some color.
An example of the type of things I might be passing as array
items would be:
Last Name : Single Item - Character (20)
First Name : Multi-Item - Character (15)
Buildings : Multi-Item - Character (04)
Room : Multi-Item - Character (04)
StartTime : Single Item - Character (
EndTime : Single Item - Character (
AccessNumber : Multi-Item - Character (10)
(Enough for this question)
The call to the script function would be:
If Registered( _
"Smith" _
, ( "Joseph" , "Joe" , "Jo" ) _
, ( "MCH" , "BEL" , "DHA" , "STL" ) _
, ( ("104" . "04") , ("22" , "32") , ... ) _
, ( "03/10/05|09:00") _
, ( "03/10/05|11:45") _
, ( "1022-34-54" ) _
) then etc...
My problem is with the function header which I've written as:
Function Registered ( _
LName As String _
, ParamArray FName As Variant _
, ParamArray Building As Variant _ <--- error location
, ParamArray Room As Variant _
, StartTime As String _
, EndTime As String _
, ParamArray AccessNumber As Variant _
) As Boolean
Body of Function follows
The problem is that no matter what I try it appears to refuse
to allow more than a single variant array to be passed to the
function. The error message I get is "Expected )" and the error
is posted on the comma at the line that starts the line for the
"Building". Moving the "StartTime" and "EndTime" lines up after
the "LName" line simply moves the error down two lines.
Any ideas? Is this a futile effort and impossible (before I try
and spend a lot more time trying to make it work)?
David
P.S. Sorry for the length but better a little longer with clarity
than too short with confusion. dfs
obtuse kind of question, dealing with manipulating them while
passing them into "functions" and "subroutines" to be evaluated
with the result either stored in another cell or the color of
a cell changed to some color.
An example of the type of things I might be passing as array
items would be:
Last Name : Single Item - Character (20)
First Name : Multi-Item - Character (15)
Buildings : Multi-Item - Character (04)
Room : Multi-Item - Character (04)
StartTime : Single Item - Character (
EndTime : Single Item - Character (
AccessNumber : Multi-Item - Character (10)
(Enough for this question)
The call to the script function would be:
If Registered( _
"Smith" _
, ( "Joseph" , "Joe" , "Jo" ) _
, ( "MCH" , "BEL" , "DHA" , "STL" ) _
, ( ("104" . "04") , ("22" , "32") , ... ) _
, ( "03/10/05|09:00") _
, ( "03/10/05|11:45") _
, ( "1022-34-54" ) _
) then etc...
My problem is with the function header which I've written as:
Function Registered ( _
LName As String _
, ParamArray FName As Variant _
, ParamArray Building As Variant _ <--- error location
, ParamArray Room As Variant _
, StartTime As String _
, EndTime As String _
, ParamArray AccessNumber As Variant _
) As Boolean
Body of Function follows
The problem is that no matter what I try it appears to refuse
to allow more than a single variant array to be passed to the
function. The error message I get is "Expected )" and the error
is posted on the comma at the line that starts the line for the
"Building". Moving the "StartTime" and "EndTime" lines up after
the "LName" line simply moves the error down two lines.
Any ideas? Is this a futile effort and impossible (before I try
and spend a lot more time trying to make it work)?
David
P.S. Sorry for the length but better a little longer with clarity
than too short with confusion. dfs