In Excel VBA you can do this

hVec = Array(10, 20, 30)
Set objSheet = ActiveWorkbook.Worksheets(1)
Set hRange = Range("B8:D10")
hRange = hVec

The last lines look like assignment, but it's treated as setting the default 
property of the range object hRange

hRange.value = hVec

(which sets three cells in each row in the range).

in vbscript, the same code does nothing, and I think hRange = hVec is just seen 
as assignment.

I assume excel/vba can do what it does cause it's got "inside information" 
about what a range option can accept.  In powerpro, the equivalent

local hVec = vec.create(5)
hVec[0] = 10
....

objApp = com.create_object("Excel.Application")
objApp.visible = 1
objApp.Workbooks.Add
local objSheet = objApp.ActiveWorkbook.Worksheets(1) 
local range  = objSheet.range("B1:F2")
range  = hVec ; NOT RECOGNISED AS SET PROPERTY
; works okay (in my dev code, SAFEARRAY args not yet distributed)
objSheet.range("B1:F2") = hVec 


range = hVec never even causes anything in com plugin code to twitch, cause I 
assume you, Bruce, just see a simple assignment.  

I'm inclined just to document problem, if it is one.  In principle, Bruce, if 
you saw 

handle = x

you could pass it to me, and I could do something (pass it back to you?) if it 
wasn't a property assignment.  Sounds like a lot of work.





Reply via email to