[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Withevents

Posted on 1998-05-17
1
Medium Priority
?
540 Views
Last Modified: 2008-03-10
If I skip the Event RenameNode row I get the error message Object does not source Automation events. Why is this row necessary?

==form code (a form with a treeview)
Option Explicit

Dim WithEvents urban As nisse

Private Sub Form_Load()
     Set urban = New nisse
     urban.init TreeView1
End Sub

=class code
Option Explicit

Private WithEvents TV As ComctlLib.treeview
?Event RenameNode(Data As Variant, NewName As String, Cancel As Integer)

Sub init(treeview As ComctlLib.treeview)
    Set TV = treeview
End Sub
Private Sub TV_Click()
    MsgBox "hej"
End Sub
0
Comment
Question by:manne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
johnny_5 earned 150 total points
ID: 1451901
The class must source an event for it to be an "Object which sources Automation events"  I ran into the same problem and thought it was pretty stupid.  Create another event, like

Event Fubar()

and then comment out your event RenameNode event and you shouldn't get the error.  

SHOULD work! :)

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question