call a sub in a class from another class/Designer (IRibbonExtensibility)-VBForums
Results 1 to 4 of 4

Thread: call a sub in a class from another class/Designer (IRibbonExtensibility)

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2015
    Posts
    11

    Question call a sub in a class from another class/Designer (IRibbonExtensibility)

    Hi

    Ive implemented a class Designer (DSR) with the IRibbonExtensibility in my Excel Activecex dll. So far so (more or less) good...
    The problem is that i can only call (in the ribbon) procedures that are inside the ribbon class/Designer.

    How can i can i call procedures in another class or even in a module?

    Thanks a lot... and sorry for the newbi questions...

    Jorge

  2. #2

    Thread Starter
    New Member
    Join Date
    Dec 2015
    Posts
    11

    Re: call a sub in a class from another class/Designer (IRibbonExtensibility)

    Anyone on this?

    Thanks!!

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    16,500

    Re: call a sub in a class from another class/Designer (IRibbonExtensibility)

    I admit, I don't fully understand the statement "How can i can i call procedures in another class or even in a module?" Are you talking about calling something within your own activex dll? If so, you provide a public function/sub in a class exposed by the dll. The function/sub can then call anything in your dll project.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Icon Organizer/Extractor}
    {VB and DPI Tutorial} {XP/Vista Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2015
    Posts
    11

    Re: call a sub in a class from another class/Designer (IRibbonExtensibility)

    Hi

    Figured it out!

    Im talking about Activex Dll for Excel (how to make a ribbon in vb6 trough office IRibbonExtensibility)

    Well for this to work you have to create a Designer file, implement the IRibbonExtensibility (Implements IRibbonExtensibility)
    And make sure that all the subs you call in the ribbon are inside the deginer file.
    And of course reference microsoft office XX.0 object library

    The procedure shloud begin something like: Public Sub yoursubname (ByVal control As IRibbonControl)

    and have this function in the designer file:

    Public Function IRibbonExtensibility_GetCustomUI(ByVal RibbonID As String) As String
    IRibbonExtensibility_GetCustomUI = GetRibbonXML()
    End Function

    Thats it.
    thanks everyone for the replys!

    Abny questions be free to PM me...

    Cheers
    Jorge

Tags for this Thread

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

Survey posted by VBForums.