Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VBS OCX used from VFP 6
Message
De
21/11/2002 19:25:54
Larry Rix
Larry Rix & Associates, Inc.
Westminster, Colorado, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
VBS OCX used from VFP 6
Divers
Thread ID:
00725550
Message ID:
00725550
Vues:
34
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
Fil
Voir

Click here to load this message in the networking platform