+ Reply to Thread
Results 1 to 4 of 4

diff toolbar for diff workbook

  1. #1
    Junior728
    Guest

    diff toolbar for diff workbook

    Hello,

    I am just wondering if i open up A workbook, it will appear A toolbar . if i
    open another workbook, it will appear that toolbar for that workbook. Simply
    said, just want to make the macro tool buttons independent for each workbook.
    It seems the the create toolbar thing is linked to the whole excel program,
    see all my toolbars that i have created so far even when i just open up the
    exel application without opening any workbook.

    Can anyone give some advice on how to make it independent? btw, i did not
    know how to write the script for creating toolbar and buttons, i just did it
    using the excel "add and remove" button under view toolbar menu.



  2. #2
    Forum Contributor
    Join Date
    03-24-2004
    Location
    Edam Netherlands
    Posts
    181
    You should create your toolbar in the on activate event and delete it in the
    deactivate event.

  3. #3
    Junior728
    Guest

    Re: diff toolbar for diff workbook

    Hi Kaak,

    Thanks for your reply.

    wHat do u mean by on activate and deactivitive? i have never come across
    this before? can u elaborate further?

    "Kaak" wrote:

    >
    > You should create your toolbar in the on activate event and delete it in
    > the
    > deactivate event.
    >
    >
    > --
    > Kaak
    > ------------------------------------------------------------------------
    > Kaak's Profile: http://www.excelforum.com/member.php...fo&userid=7513
    > View this thread: http://www.excelforum.com/showthread...hreadid=498624
    >
    >


  4. #4
    Forum Contributor
    Join Date
    03-24-2004
    Location
    Edam Netherlands
    Posts
    181
    The workbook has events of his one.

    This code is for the workbook, not in a module or in a sheet.

    Private Sub Workbook_Activate()

    'MsgBox ("Workbook_Activate")

    Call CreateMenu

    End Sub

    Private Sub Workbook_Deactivate()

    'MsgBox ("Workbook_Deactivate")

    Call DeleteMenu

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1