0 Replies - 982 Views - Last Post: 10 September 2009 - 06:53 PM Rate Topic: -----

#1 mycraz  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 81
  • Joined: 10-June 09

activex component can't create object

Posted 10 September 2009 - 06:53 PM

hi,
I'm trying to make multi-threads.I got the error 249 : activex component can't create object. I'm not sure my steps correct or not. Someone please help me confirm with it.Thank you.
I open a new activex.exe project and copy this code into the class module.then i compiled this to project.exe.
Public Function addOne(x As Long)
x = x + 1
addOne = x
End Function



Then i open another project in standard.exe and copy this into a form and click on project to make project1.exe references to this standard.exe.Then i run my project.

Private Sub command1_click()
Set tc1 = CreateObject("Project1.ThreadClass")

For i = 1 To 20000000
   DoEvents
   Label1.Caption = tc1.addOne(i)
   Label1.Refresh
Next
End Sub


Private Sub command2_click()
Set tc2 = CreateObject("Project1.ThreadClass")

For j = 1 To 20000000
   DoEvents
   Label2.Caption = tc2.addOne(j)
   Label2.Refresh
Next
End Sub



Is This A Good Question/Topic? 0
  • +

Page 1 of 1