dcsimg
Results 1 to 5 of 5

Thread: How get Extra Office VBE Events like VBComponentsEvents and VBProjectsEvents

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2015
    Posts
    223

    How get Extra Office VBE Events like VBComponentsEvents and VBProjectsEvents

    it seems Office VBE does not have these two Events
    but we can see _VBComponentsEvents _dispVBComponentsEvents _VBProjectsEvents and _dispVBProjectsEvents
    my problem is how we can get these two events in VBA?

    i have found some dotnet written for VBA addins such as rubberduck has got these two events.
    Attached Files Attached Files

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,852

    Re: How get Extra Office VBE Events like VBComponentsEvents and VBProjectsEvents

    i would presume that you would have to initiate an instance of the class for the events to fire
    i have noticed that the procedures in the sample all have some error in the header, using the dropdown list avoided the error, but i could not see what the difference was
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2015
    Posts
    223

    Re: How get Extra Office VBE Events like VBComponentsEvents and VBProjectsEvents

    Quote Originally Posted by westconn1 View Post
    i would presume that you would have to initiate an instance of the class for the events to fire
    i have noticed that the procedures in the sample all have some error in the header, using the dropdown list avoided the error, but i could not see what the difference was
    those events subroutines are all auto-created by the dropdown click.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    24,852

    Re: How get Extra Office VBE Events like VBComponentsEvents and VBProjectsEvents

    those events subroutines are all auto-created by the dropdown click.
    they did not travel well then, when i opened the workbook the private sub lines were all in red, recreating then from the drop down resolved the issue, even though i could not see any difference at all
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2015
    Posts
    223

    Re: How get Extra Office VBE Events like VBComponentsEvents and VBProjectsEvents

    Quote Originally Posted by westconn1 View Post
    they did not travel well then, when i opened the workbook the private sub lines were all in red, recreating then from the drop down resolved the issue, even though i could not see any difference at all
    i wanna to post it here to find if someone can help get those events.
    far as i known, maybe i need subclassing or message hooking

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width