S
Simon Lloyd
T. Valko, thanks for sticking with this discussion, i've enjoyed it!
rether than a button (sort of) and getting back to the personal.xls ho
about using this (i know we no longer use Autpen etc but it serves
purpose here), all the code below can go in a standard modlue in th
personal.xls, i assume that it will create the new menu item and work a
planned, not tested (im using 2007 now and i don't like it!)
Code
-------------------
Sub Auto_Close(Cancel As Boolean
On Error Resume Nex
Application.CommandBars("worksheet Menu Bar").Controls("Kill The Ants").Delet
On Error GoTo
End Su
Sub Autpen(
With Applicatio
.CommandBars.ActiveMenuBar.Enabled = Tru
For Each c In .CommandBars("Worksheet menu Bar").Control
If c.Caption = "Kill The Ants" Then c.Delet
Next
Set cb = .CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlButton, temporary:=True, ID:=2950, before:=1
cb.Caption = "Kill The Ants
cb.TooltipText = "Remove dotted line after paste
cb.OnAction = ("!KillAnts"
cb.Style = msoButtonCaptio
End Wit
End Su
Sub KillAnts(
Application.CutCopyMode = Fals
End Su
-------------------
--
Simon Lloyd
Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
rether than a button (sort of) and getting back to the personal.xls ho
about using this (i know we no longer use Autpen etc but it serves
purpose here), all the code below can go in a standard modlue in th
personal.xls, i assume that it will create the new menu item and work a
planned, not tested (im using 2007 now and i don't like it!)
Code
-------------------
Sub Auto_Close(Cancel As Boolean
On Error Resume Nex
Application.CommandBars("worksheet Menu Bar").Controls("Kill The Ants").Delet
On Error GoTo
End Su
Sub Autpen(
With Applicatio
.CommandBars.ActiveMenuBar.Enabled = Tru
For Each c In .CommandBars("Worksheet menu Bar").Control
If c.Caption = "Kill The Ants" Then c.Delet
Next
Set cb = .CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlButton, temporary:=True, ID:=2950, before:=1
cb.Caption = "Kill The Ants
cb.TooltipText = "Remove dotted line after paste
cb.OnAction = ("!KillAnts"
cb.Style = msoButtonCaptio
End Wit
End Su
Sub KillAnts(
Application.CutCopyMode = Fals
End Su
-------------------
T. Valko;186987 said:The *.xlb file is a file that stores information about toolbars an
menus
What you could do is create a new default book.xlt template and put th
cod
in there. Save the book.xlt file in the Excel startup directory. The
ever
*new file* will have the code available but already existing file
won'
have it
Eh, that doesn't sound too "cool"! I'm sure you'd want to have thi
available to *every* file. The only way I know how to do that is wha
I'v
done and create a toolbar button and attach the macro
It's more of an "ergonomics" issue with me. It's easier to use th
mouse t
click the button then to have to look away to the keyboard and "find
th
ESC key
-
Bif
Microsoft Excel MV
Cage Forums' (http://www.thecodecage.com/forumz/showthread.php?t=50724)
--
Simon Lloyd
Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)