+ Reply to Thread
Results 1 to 2 of 2

Toolbar problem

  1. #1
    Anthony
    Guest

    Toolbar problem

    Can somebody please help me before I really hurt my head ageist a wall.

    I have an Excel worksheet that contains a toolbar that I have created. When
    I change or add anything to this toolbar and open the worksheet on another PC
    in the office (from a shared drive) none of the changes or additions to my
    toolbar are shown.

    I have tried attaching and de-ataching the toolbar through right clicking
    the toolbar and selecting customize. In fact here is the process that I
    perform

    Right click on the toolbar and delete my toolbar from the workbook
    Amend the toolbar
    Right click on the toolbar and add my toolbar back to the workbook
    Save the workbook

    Now, after completing the above process and I go to another office PC , none
    of my changes are shown.

    I also have this VB code to delete the toolbar on closing the workbook:-

    Private Sub workbook_beforeclose(cancle As Boolean)
    On Error Resume Next 'in case toolbar is absent
    Application.CommandBars(LP_Log).Close

    End Sub


    Is this correct, because if I open a new excel worksheet my toolbar is shown !
    If it is correct, where within my VB script should I place this code??

    I hope somebody can offer some help, as this is really bugging the life out
    of me.

    I am in no way an expert in Excel VB so please explain in simple terms !!

    Really appreciate any help

    Cheers


  2. #2
    Dave Peterson
    Guest

    Re: Toolbar problem

    Maybe your code should look more like this:

    Option Explicit
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Dim LP_Log As String
    LP_Log = "toolbarNameHere"
    On Error Resume Next
    Application.CommandBars(LP_Log).Delete
    End Sub

    It's difficult to tell what LP_log is.

    You may want to read Jan Karel Pieterse's notes at:
    http://google.com/groups?threadm=083...280a%40phx.gbl

    In fact, Jan Karel wrote a different set of instructions that may help you avoid
    the problems associated with attached toolbars.

    http://www.jkp-ads.com/Articles/DistributeMacro00.htm

    Anthony wrote:
    >
    > Can somebody please help me before I really hurt my head ageist a wall.
    >
    > I have an Excel worksheet that contains a toolbar that I have created. When
    > I change or add anything to this toolbar and open the worksheet on another PC
    > in the office (from a shared drive) none of the changes or additions to my
    > toolbar are shown.
    >
    > I have tried attaching and de-ataching the toolbar through right clicking
    > the toolbar and selecting customize. In fact here is the process that I
    > perform
    >
    > Right click on the toolbar and delete my toolbar from the workbook
    > Amend the toolbar
    > Right click on the toolbar and add my toolbar back to the workbook
    > Save the workbook
    >
    > Now, after completing the above process and I go to another office PC , none
    > of my changes are shown.
    >
    > I also have this VB code to delete the toolbar on closing the workbook:-
    >
    > Private Sub workbook_beforeclose(cancle As Boolean)
    > On Error Resume Next 'in case toolbar is absent
    > Application.CommandBars(LP_Log).Close
    >
    > End Sub
    >
    > Is this correct, because if I open a new excel worksheet my toolbar is shown !
    > If it is correct, where within my VB script should I place this code??
    >
    > I hope somebody can offer some help, as this is really bugging the life out
    > of me.
    >
    > I am in no way an expert in Excel VB so please explain in simple terms !!
    >
    > Really appreciate any help
    >
    > Cheers


    --

    Dave Peterson

+ 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