ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Source Excel Template Pops Up when using a custom toolbar (https://www.excelbanter.com/excel-discussion-misc-queries/59018-source-excel-template-pops-up-when-using-custom-toolbar.html)

Murray

Source Excel Template Pops Up when using a custom toolbar
 
-I opened a new spreadsheet
-I created two macros and set them to all workbooks
---Sub ConvertToUpperCase()
Dim Rng As Range
For Each Rng In Selection.Cells
If Rng.HasFormula = False Then
Rng.Value = UCase(Rng.Value)
End If
Next Rng
End Sub

Sub ConvertToLowerCase()
Dim Rng As Range
For Each Rng In Selection.Cells
If Rng.HasFormula = False Then
Rng.Value = LCase(Rng.Value)
End If
Next Rng
End Sub
-I created a custom Toolbar and added two custom buttons, one for the
uppercase, one for the lowercase macro
-I attached the toolbar to the workbook using Tools/Customize/Toolbars/Attach
-I saved the workbook as a template, changecase.xlt, in
C:\Documents and Settings\me\Application Data\Microsoft\Templates
-I opened a new workbook and the custom toolbar was there
-I typed in some text and selected it and clicked the change to upper case
button
-the case changed, but the file changecase.xlt opened

What have I done incorrectly? I, of course, do no want the template to open.


Gord Dibben

Source Excel Template Pops Up when using a custom toolbar
 
Murray

How did you open a new workbook?

The workbook you get with FileNewBlank Workbook is not based on the
changecase Template.

Try opening a new workbook through FileNew...TemplatesOn my Computer.

Browse to your changecase template and open it.

It will open as changecase1.xls and you macros will be available.

I would save the workbook as an add-in and load it through ToolsAdd-ins.

Any macros you place in that add-in will be available for any open workbook.


Gord Dibben Excel MVP


On Tue, 6 Dec 2005 12:48:02 -0800, Murray
wrote:

-I saved the workbook as a template, changecase.xlt, in
C:\Documents and Settings\me\Application Data\Microsoft\Templates
-I opened a new workbook and the custom toolbar was there


Murray

Source Excel Template Pops Up when using a custom toolbar
 
Thank you Gord,

Your reply was spot on. I was not opening the Template correctly. I followed
your suggestion and saved the .xls file as an add-in. We use group policy to
redirect user's documents and settings to their H drive. With the add-in
solution, I can simply send instructions to users on how to add this custom
toolbar as an add-in. The .xla file is copied to:

C:\Documents and Settings\%username%\Application Data\Microsoft which of
course is the user's H drive, so they have write permission.


Thanks again,

Murray

Gord Dibben

Source Excel Template Pops Up when using a custom toolbar
 
Thanks for the feedback Murray

Glad you got it sorted.

If you wanted to get really fancy you could create the Toolbar on the fly when
the Add-in loads.

Then no need for attaching the Toolbar.



Gord

On Tue, 6 Dec 2005 15:27:02 -0800, Murray
wrote:

Thank you Gord,

Your reply was spot on. I was not opening the Template correctly. I followed
your suggestion and saved the .xls file as an add-in. We use group policy to
redirect user's documents and settings to their H drive. With the add-in
solution, I can simply send instructions to users on how to add this custom
toolbar as an add-in. The .xla file is copied to:

C:\Documents and Settings\%username%\Application Data\Microsoft which of
course is the user's H drive, so they have write permission.


Thanks again,

Murray



All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com