View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
shishi shishi is offline
external usenet poster
 
Posts: 33
Default Reading to a 1-D array...Error

Hi,

I am trying to read a single column into an array. The code that I
have written is giving me a Runtime Error '1004'- Application -
defined or Object - defined error. Could you please help me to
understand the mistake...The code is as below.

Function GenMArray() As Variant

ThisWorkbook.Sheets("SUMMARY").Range("NO_OF_MODULE S").Activate
ActiveCell.Offset(3, 1).Select

MsgBox "The address is " & ActiveCell.Address
GenMArray = Application.Transpose(Range(ActiveCell,
ActiveCell.End(xlDown)))

End Function

Thanks,
shi