mweaver
2009-08-07, 03:27 AM
I am working on an application that drags information from excel with vlisp. Excel has an intersect method I want to invoke, but can't seem to get the syntax correct. The excel help has the following example:
Application.Intersect(Range("rg1"), Range("rg2"))
I have the following:
_24$ (cdr (nth 6 rangenames))
#<VLA-OBJECT Name 1f93f58c>
_24$ (cdr (nth 21 rangenames))
#<VLA-OBJECT Name 14a849c4>
_24$ (vlax-invoke-method excelapp 'intersect (cdr (nth 21 rangenames))(cdr (nth 6 rangenames)))
; error: Automation Error. Intersect method of Application class failed
I've also tried:
(vlax-invoke-method excelapp 'intersect (list (cdr (nth 21 rangenames))(cdr (nth 6 rangenames))))
; error: too few actual parameters
Do I need to pass my range arguments in a safearray?
Any help would be appreicated.
Mike
Application.Intersect(Range("rg1"), Range("rg2"))
I have the following:
_24$ (cdr (nth 6 rangenames))
#<VLA-OBJECT Name 1f93f58c>
_24$ (cdr (nth 21 rangenames))
#<VLA-OBJECT Name 14a849c4>
_24$ (vlax-invoke-method excelapp 'intersect (cdr (nth 21 rangenames))(cdr (nth 6 rangenames)))
; error: Automation Error. Intersect method of Application class failed
I've also tried:
(vlax-invoke-method excelapp 'intersect (list (cdr (nth 21 rangenames))(cdr (nth 6 rangenames))))
; error: too few actual parameters
Do I need to pass my range arguments in a safearray?
Any help would be appreicated.
Mike