vml19
vml19

Reputation: 3864

Using Activex Control with Parameters

I have built an ActiveX control and when I use without parameter it works, it doesn't work when it used with parameters.

<OBJECT  classid="clsid:959B7E21-5C0B-4BEC-BA2E-48DA2B6D66C8"></OBJECT>

It doesn't load in IE when I use as follows, nothing is displayed.

<OBJECT  classid="clsid:959B7E21-5C0B-4BEC-BA2E-48DA2B6D66C8">                
            <PARAM NAME="Id" VALUE="2">
</OBJECT>

Also I am receiving this warning

enter image description here

In my control code I have defined the property for the control as follows,

Option Explicit
Dim m_Id As Integer
Public Property Get Id() As String
    Id= m_Id 
End Property

Public Property Let Id(ByVal New_Id As String)
    m_Id = New_Id
    PropertyChanged "Id"
End Property

Upvotes: 1

Views: 1288

Answers (2)

Xearinox
Xearinox

Reputation: 3234

Your ActiveX is not safe for scripting. See Safe Initialization and Scripting for ActiveX Controls

Upvotes: 1

vml19
vml19

Reputation: 3864

The warning message disappeared after I did the following.

  1. Start -> Run -> regedit
  2. Go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVer sion\Internet Settings\Zones\0
  3. Doubleclick 1201 and change the value to 0 (it was probably 1)
  4. Close Registry Editor

Upvotes: 0

Related Questions