Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VBS OCX used from VFP 6
Message
From
21/11/2002 19:25:54
Larry Rix
Larry Rix & Associates, Inc.
Westminster, Colorado, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
VBS OCX used from VFP 6
Miscellaneous
Thread ID:
00725550
Message ID:
00725550
Views:
33
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
Reply
Map
View

Click here to load this message in the networking platform