Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing range as an argument in a function
Hi,
I want to pass the values of an array in to a function. Please tell me how to do it. Here is my Array which is reading values from a sheet called sheet1 For n = 2 To 20 empclass(n - 2) = UCase(Sheets("sheet1").Cells(n, 251)) Next n The function is already accepting lots of other values :- Public Function Validate(ByVal sheetName As String, a As Integer, ByVal b As Integer, ByVal c As Integer, ByVal d As Integer, ByVal e As Integer, ByVal f As Integer, ByVal g As Integer, ByVal h As Integer) As Integer Please tell me how I should define the empclass as one more argument in the function. Regards, Hari India |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passing range as an argument in a function
Untested, but:
ByRef empclass() As String should work. -- Vasant "Hari" wrote in message ... Hi, I want to pass the values of an array in to a function. Please tell me how to do it. Here is my Array which is reading values from a sheet called sheet1 For n = 2 To 20 empclass(n - 2) = UCase(Sheets("sheet1").Cells(n, 251)) Next n The function is already accepting lots of other values :- Public Function Validate(ByVal sheetName As String, a As Integer, ByVal b As Integer, ByVal c As Integer, ByVal d As Integer, ByVal e As Integer, ByVal f As Integer, ByVal g As Integer, ByVal h As Integer) As Integer Please tell me how I should define the empclass as one more argument in the function. Regards, Hari India |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passing a range name as an argument to the Index Function | Excel Discussion (Misc queries) | |||
VBA - Passing a FUNCTION as an Argument | Excel Programming | |||
Passing range as argument | Excel Programming | |||
Passing an Array of User-Defined Type to an Argument of a Function | Excel Programming | |||
passing a variable as an argument to a function | Excel Programming |