|
|
Thanks Dave:
I will try the vbs code edition, but say I have other toolbars in the
same workbook; how would I edit the vbs code, ...
would the following be accurate;
Private Sub Workbook_BeforeClose(Cancel as Boolean)
On Error Resume Next 'In case Toolbar is absent
Application.CommandBars("toolbar1,toolbar2,toolbar 3").Delete
End Sub
Thank you for your patience.
I hope this is my last request.
------------------------------------------------------
"Dave Peterson" escribió en el mensaje
...
Once you've shared that toolbar with the other pc, then that toolbar stays
on
that other pc. You can clean up the toolbar (just like you did on your
pc).
But say you have a toolbar attached to a workbook. You share that
workbook with
me. Now I have that toolbar, too. If you go and remove the toolbar from
the
workbook (or just change it), my toolbar doesn't change.
If you share that workbook with the new toolbar with me, my copy of excel
notices that I already have that toolbar with the same name. Since I
already
have that toolbar (even though it's out of date), excel figures that it
shouldn't be messed with.
So my old toolbar still persists on my pc.
So if I deleted that toolbar from my pc, then you shared the new workbook,
I'd
get the new toolbar (excel notices that I don't have it, so it uses the
toolbar
that's attached).
Jan Karel's notes included a routine that cleaned up mechanically.
Stolen from Jan Karel's post:
...
After creating *or changing* the toolbar, you should
attach the toolbar to your workbook:
- activate the workbook to which you want to attach the toolbar
- Rightclick the toolbar, select 'customize'
- Click 'Attach' (Toolbars Tab)
- If the workbook already contains a toolbar by that name,
delete it first by clicking on it on the righthand side
and choosing Delete.
- Select your toolbar (on the left) and press 'copy'
- Save the workbook (optionally: save_as an add-in).
==========
Later he suggests this code:
Private Sub Workbook_BeforeClose(Cancel as Boolean)
On Error Resume Next 'In case Toolbar is absent
Application.CommandBars("YourBarsName").Delete
End Sub
Load your workbook with that attached toolbar.
Modify the heck out of it.
Attach it to the workbook once more.
Then rightclick on the excel icon to the left of the File|Edit|View menu
items
on the standard toolbar.
Select View Code
Paste that little snippet of code into that code window that you see.
(adjust the "YourBarsName" to what it really is in your workbook.)
alt-f11 to get back to excel.
Save your newly changed workbook.
Close this workbook.
Then check under Tools|customize|toolbars Tab
You won't see your toolbar anymore.
Reopen your workbook with the attached toolbar and check again. You'll
notice
that that toolbar is back.
Now if you share this workbook with anyone, a couple of things can happen
when
they open the workbook the first time:
1. If they have that old toolbar hanging around, they'll see that old
toolbar.
2. If they don't have that old toolbar, they'll see the new one.
But when they close the workbook, the toolbar (old or new) will be
removed.
Then the second time they open the workbook, they'll see the new toolbar.
=======
Just a word of warning. Each time you change that toolbar, make sure you
reattach it to the workbook. It ain't automatic.
007 wrote:
Thanks for your response Dave;
No I do not copy the user8.xlb book to other computers or users,
this is what I do before I take a file to another computer;
I delete the toolbars from;
1) attach\toolbars in the book and
2) from Customize\tool bars\delete.
I do this in both the regular file and in the user8.xlb file
[application?]
and still the toolbars show up in the other users computer. They don't
appear the same as they presently are in my computer, but as they
were some months ago [I change icons once in a while to meet my
needs but leave the same toolbar names] .
This situation seems to be improving by now, I deleted most toolbars
in the way I said before, except for one toolbar which I want to keep,
and then copied a file to another computer by means of a diskette
obviously just one toolbar could have been carried enclosed in the file,
and it did, but not as it presently is, it appeared as it was about two
months ago, with the same name but with a difference in time.
There's one small detail I have noticed; if I change the name in the
user8.xlb file as Excel help says, in order to keep the toolbars as I
want,
all customized toolbars seem to be deleted, but when I open another
file, which I have not "cleaned", all present and past toolbars appear,
but if I delete all the toolbbars I don't want and leave the user8.xlb
book alone, the changes seem to remain at least in this computer.
As to the vbs edition Jan Karel describes I don't know if it will apply
to a complete toolbar, and neither do i know how to modify it or
apply it. Any help with this?...
-------------------------------------------------
"Dave Peterson" escribió en el mensaje
...
And if you attach toolbars to workbooks, you'll want to read Jan Karel
Pieterse's notes:
http://google.com/groups?threadm=083...0a% 40phx.gbl
Dave Peterson wrote:
I'm not sure if this will help...
You can customize toolbars (usually manually via tools|customize).
These
changes are saved in a file named *.xlb (name and location vary with
versions of
excel and windows. These are not usually shared with others (well,
unless you
copy the *.xlb and overwrite their customized settings.
But toolbars can be built on the fly. Workbooks can have code that
create
toolbars whenever they open. Most (some?) workbooks clean up after
themselves.
When you close the workbook, it deletes the toolbars it created.
And finally, toolbars can live in individual workbooks. If you've
attached a
toolbar to a workbook (via tools|customize|toolbars tab|attach
button),
you can
delete them from that same workbook using the same menu options.
But
make sure
you save that workbook (w/o the attached toolbar) or you'll have to
do
it again.
But when you created this toolbar (that you attached), you have
updated
your
*.xlb to contain it, too.
Deleting that toolbar from the individual workbook could have left
it in
your
toolbar collection.
Tools|customize|toolbars tab
select that toolbar
click delete
So I think the question boils down to: How is that toolbar coming
back?
1. Is it just becoming visible (and has always been there)
2. Or is it being built on the fly (and not being cleaned up later)
3 Or is it attached to a workbook that you didn't clean up (and
save)
Any help??
007 wrote:
Hi Craig: The toolbars are programmed on my computer, every
excel file I create shows the toolbars I have created, and when I
share files to other users and computers, the toolbars show up
there,
it would be expected that customized toolbars should only apply to
the creator, not to other users as it is the case. As I
understand,
you
can program the toolbars on a particular excel file and after
closing
it,
you then change the name on the excel8 (or user8 file if on a
network)
and the toolbars should show from there on as you organized them,
and they should show only on the creator's account, well this is
not
so,
those toolbars spread like an infection to other computers and
users
by way of shared files and there is no way of getting rid ot them,
I
delete
them in Customize Toolbars\attach[or enclose]\toolbars in the book
and
also in Customize\Toolbars\Delete, and before long, they show up
again,
and today, they even appeared as they were some months ago.
There must be a way to fix this, Excel help says you can only
restore
default toolbars to original state but cannot delete created ones,
if that is so, what is the delete toolbars button for... and they
do
indeed
delete with the button but not permanently they keep restoring and
at
times they restore to a time in the past to the way they were
customized
and saved then.
This must be a problem Microsoft should look into or they should
not
include
the option to customize toolbars because it seems it cannot be
undone.
I have had trouble in the past with the system administrator
because
of
this, but there's nothing I can do to stop this from recurring.
Someone
told me I have to delete the toolbars from every file I have but
somehow
it doesn't seem logical to me. There must be a way to program
Excel
without
the toolbars on the computer instead of going through each file.
To concretely answer your question, I delete the customized
toolbars
before
I share files to prevent them from spreading to other computers
and
users,
but they do appear anyway on their computers.
I would appreciate any help.
-------------------------------------------------
"Craig" escribió en el mensaje
...
is the toolbar attached to one of the files you are sharing?
Craig
"007" wrote in message
...
Hi group:
Does anyone know how to permanently delete customized toolbars
in
Excel?.... The problem is that some time ago, I created new
toolbars
to make the use of excel faster, later I deleted those bars
and
created
new
ones, and after having deleted the prior ones, they came back
and
now
I can't delete any of the bars I have created, the only option
is
to
hide
them
because there's no way to delete them... there's a button to
delete them
but they allways return unexpectedly particularly when I share
files,
they
appear on other computers and it seems like an infection that
cannot be
erradicated. In Excel Help it says they cannot be deleted, but
if
there's
a
button to delete them and they dont delete, what is the
purpose of
that
button.
This seems to me like a defect in Excel ... and a very
problematic
one
because
I get remarks from people I share files with.
There should be a solution for this problem somewhere.
Does anyone know the solution to this problem?...
Thanks for your help.
--
Dave Peterson
--
Dave Peterson
--
Dave Peterson
|