Information générale
Catégorie:
Contrôles ActiveX en VFP
Titre:
VBS OCX used from VFP 6
Hi --
I have a VBS OCX that I am using from VFP 6. I need to pass the following VBS procedure an array:
********************************************************
Public Property Let SetMenuItems(RHS As Variant)
Dim iItem As Integer
' check up on dimension...
m_cMenuItems = UBound(RHS)
Debug.Print "[setMnuItm], ubound array: " & CStr(m_cMenuItems)
' enter the menu items in my array...
' (bump up the array size in "chunks")
For iItem = 0 To m_cMenuItems
If iItem > UBound(m_MenuItems) Then ReDim Preserve m_MenuItems(UBound(m_MenuItems) + mnuChunk)
m_MenuItems(iItem) = RHS(iItem)
Next iItem
End Property
********************************************************
I have tried the following:
********************************************************
local array ;
la_blah[2]
la_blah[1] = "blah1"
la_blah[2] = "blah2"
with THISFORM.ole_wsh
.SetMenuItems(la_blah)
endwith
********************************************************
Execution of this code produces the following error:
********************************************************
Error #1426: OLE error code 0x8002000e: Invalid number of
parameters.
********************************************************
I have tried passing by reference as well, but nothing seems
to work.
Thanks in advance!
Larry Rix
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement