Passing a variant to a methos in an ActiveX object 
Author Message
 Passing a variant to a methos in an ActiveX object

I have an .asp script accessing some ActiveX objects in a VB .dll. The code
snippet to follow is the script code. The line below;
=========>   Lightbox.AddChild 1, LightboxDetail <==============
Gives me an error. The method, Lightbox.AddChild takes as the 2nd parameter
a reference to an "Object". At run time I get a "Type mismatch" error.
In a VB executable I can easily fix this by doing the statement;
        dim Lightbox as Object
but in VBScript I can only do
        dim Lightbox
What can I do to solve this problem of resolving this type mismatch?
Thank you.
Todd

<%
        Dim Lightbox
   Dim LightboxDetail
   Dim LightboxDetailList

   Set Lightbox = Server.CreateObject("WebBO.CLightbox")
   Lightbox.Att(2) = "PaddleNow6"
   Lightbox.Att(3) = "Let's do the San Juans"

   Set LightboxDetail = Server.CreateObject("WebBO.CLightboxDetail")
   LightboxDetail.Att(3) = "Image1"
   LightboxDetail.Att(4) = "Comment1"
   LightboxDetail.Att(5) = "Descr1"

   response.write(LightboxDetail.Att(3))
   response.write(LightboxDetail.Att(4))
   response.write(LightboxDetail.Att(5))

=========>   Lightbox.AddChild 1, LightboxDetail <==============

   Set LightboxDetailList = Lightbox.GetChild(1)
%>



Sat, 03 Jun 2000 03:00:00 GMT  
 Passing a variant to a methos in an ActiveX object

In your VB code, change the second parameter of Lightbox.AddChild from
Object to variant.  That should fix it.

--
Eric Neason

Align Solutions Corp.



Mon, 05 Jun 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Assign Object to Variant and then Variant to Object

2. Trying to pass a Variant Array of Doubles to ActiveX from HTML

3. Passing an Array of Variants to an ActiveX control

4. How to pass Variant Array to VB ActiveX DLL from a VC++ application

5. Variants pass incorrectly to DCOM ActiveX EXE

6. Problem passing a variant array out of VBasic object to ASP

7. Pass Variant Array to a COM Object

8. Passing an object to an ActiveX dll from ASP script

9. Passing values by reference from java / vb script to ActiveX object

10. Passing values by reference from java / vb script to ActiveX object

11. Passing object variables to an activex dll

12. Passing object variable to an Activex dll

 

 
Powered by phpBB® Forum Software