View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jmoffat[_5_] jmoffat[_5_] is offline
external usenet poster
 
Posts: 1
Default Running worksheet function in VBA

I am trying to run the worksheet function Minverse in VBA using:

result = Application.WorksheetFunction.MInverse(pt_array)

This works ok if pt_array is a range taken from a worksheet

(eg pt_array = range("A1:c3"))


However if I try and incorporate an array directly with VBA

(eg pt_array(1)=1 ; pt_array(2)=2 ... etc)

the function fails.

I guess I need to convert my array to a range somehow - and I'd rather
not write it out to a worksheet and then have to read it back in.

Any Ideas ?


---
Message posted from http://www.ExcelForum.com/