#1   Report Post  
Anthony
 
Posts: n/a
Default 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   Report Post  
Dave Peterson
 
Posts: n/a
Default

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...0a% 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Placing a toolbar and it moves Leon POLAK Excel Discussion (Misc queries) 1 May 23rd 05 09:35 AM
Toolbar saving problem Anthony Excel Discussion (Misc queries) 3 March 21st 05 06:17 PM
custom toolbar w/ macro Darien Excel Discussion (Misc queries) 3 February 2nd 05 09:16 PM
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM
"Drawing" Toolbar is inactive Deauxx Excel Discussion (Misc queries) 1 December 8th 04 03:03 PM


All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"