Passing range as an argument in a function

  • Thread starter Thread starter Hari
  • Start date Start date
H

Hari

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top