Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SV SV is offline
external usenet poster
 
Posts: 15
Default Macros Not In Toolbars

Greetings,
I'm using Excel 2003 and a while back I posted a request for how to do some
calculations and combining. I got some great suggestions for macros and
implemented them. They work great, too!
So, I assigned them to toolbar buttons and removed most other toolbars and
icons (Very limited application macros) so that when people use that
spreadsheet, they see exactly what they need, nothing more. I posted the
spreadsheet on our shared drive for everyone to use.

Unfortunately, it seems that now, no matter what spreadsheet I open, I get
those toolbar buttons and the ones I removed for that one spreadsheet are
removed on my local Excel. I"m guessing I didn't save the macros as
'accessible only on that spreadsheet' or something, too.

So I have to wonder... how can I make the macros 'button accessible' to
everyone but only on THAT spreadsheet?
Perhaps a way of adding a button to the spreadsheet itself?

Any ideas would be appreciated.

Thanks,
Shane



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 515
Default Macros Not In Toolbars

Since you remove the other toolbars as part of your code, you have to
reinstate them before your sheet closes, possibly as part of your
Worksheet_BeforeClose event. By the same token, you have to remove the
custom toolbar, which you activated as part of opening your file. Not
knowing what exactly you created and removed, I am not clever enough to quote
the code you should use.
--
Hth

Kassie Kasselman


"SV" wrote:

Greetings,
I'm using Excel 2003 and a while back I posted a request for how to do some
calculations and combining. I got some great suggestions for macros and
implemented them. They work great, too!
So, I assigned them to toolbar buttons and removed most other toolbars and
icons (Very limited application macros) so that when people use that
spreadsheet, they see exactly what they need, nothing more. I posted the
spreadsheet on our shared drive for everyone to use.

Unfortunately, it seems that now, no matter what spreadsheet I open, I get
those toolbar buttons and the ones I removed for that one spreadsheet are
removed on my local Excel. I"m guessing I didn't save the macros as
'accessible only on that spreadsheet' or something, too.

So I have to wonder... how can I make the macros 'button accessible' to
everyone but only on THAT spreadsheet?
Perhaps a way of adding a button to the spreadsheet itself?

Any ideas would be appreciated.

Thanks,
Shane




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SV SV is offline
external usenet poster
 
Posts: 15
Default Macros Not In Toolbars

Kassie,
Hmm.. well... I didn't use much code beyond a macro to combine the
contents of a given cell. I'm too new to macros to even know what a
'beforeClose event is.
I did, however, customize the toolbars to show the Macros toolbar with two
buttons I created.
The problem seems to be that by customizing my toolbar in that worksheet (to
show the Macros toolbar, with my custom buttons), I made it so Excel always
shows that toolbar, even if those macros don't exist in the new worksheet.

I'm accustomed to Word's template file and being able to make different
templates and link documents to them. With that, I can open up one document
linked to one template and another document linked to another.
I see 'template files' for excel, but I don't see how you link a given
spreadsheet to the template.

Do you know if there's a way to set up Excel's toolbars and save a template
file such that when we open the workbook in the shared directory it shows
the 'special' toolbar, but when we open our own Excel documents it shows our
'usual' toolbars???

Thanks,
Shane
"kassie" (Change xxx to hotmail) wrote in message
...
Since you remove the other toolbars as part of your code, you have to
reinstate them before your sheet closes, possibly as part of your
Worksheet_BeforeClose event. By the same token, you have to remove the
custom toolbar, which you activated as part of opening your file. Not
knowing what exactly you created and removed, I am not clever enough to
quote
the code you should use.
--
Hth

Kassie Kasselman


"SV" wrote:

Greetings,
I'm using Excel 2003 and a while back I posted a request for how to do
some
calculations and combining. I got some great suggestions for macros and
implemented them. They work great, too!
So, I assigned them to toolbar buttons and removed most other toolbars
and
icons (Very limited application macros) so that when people use that
spreadsheet, they see exactly what they need, nothing more. I posted the
spreadsheet on our shared drive for everyone to use.

Unfortunately, it seems that now, no matter what spreadsheet I open, I
get
those toolbar buttons and the ones I removed for that one spreadsheet are
removed on my local Excel. I"m guessing I didn't save the macros as
'accessible only on that spreadsheet' or something, too.

So I have to wonder... how can I make the macros 'button accessible'
to
everyone but only on THAT spreadsheet?
Perhaps a way of adding a button to the spreadsheet itself?

Any ideas would be appreciated.

Thanks,
Shane






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 515
Default Macros Not In Toolbars

You have correctly diagnosed your problem! Yes, if you manually create a
toolbar, it will be there until you remove it! Ideally, you should create
and activate custom toolbars or buttons through code on opening your
workbook, and then again remove them, using code. on closing your workbook
You can right click on the Excel logo (top left), click on View Code, in the
right hand pane select Workbook in the left box, and a Workbook_open macro
will be initialised. You can paste the following there, between the name and
End Sub


Dim tBar, newButton

'Delete CommandBar if it exists
On Error Resume Next
CommandBars("Special Task").Delete
On Error GoTo 0

'create CommandBar
CommandBars.Add Name:="Special Task"

'define an object variable to refer to the CommandBar
Set tBar = CommandBars("Special Task")

'add first button
Set newButton = tBar
..Controls.Add(Id:=2950)

'specify tooltip (name), macro to run, and status bar text for the macro
With newButton
.OnAction = "AddInfo"
.Caption = "Add Info"
End With

'add next button.
Set newButton = tBar.Controls.Add

With newButton
.Caption = "Remove Information"
.OnAction = "RemoveInfo"
.FaceId = 278
.BeginGroup = True
End With

'display CommandBar, position on spreadsheet
tBar.Visible = True
With CommandBars("Special Task")
.Left = 200
.Top = 200
End With

Obviously this is sample code, and you will have to adapt to suit your needs.

Then click on the down arrow of the box on the right, and select
Before_Close. After before close, and before end sub, enter the following;

CommandBars("Special Task").Delete

to remove the toolbar. Not much ehlp if you do not know about macros
though! With more info from your part, maybe someone here will be able to
help you a lot better. By the way, this example was taken from Visual Basic
Macros Made Easy.
--
Hth

Kassie Kasselman


"SV" wrote:

Kassie,
Hmm.. well... I didn't use much code beyond a macro to combine the
contents of a given cell. I'm too new to macros to even know what a
'beforeClose event is.
I did, however, customize the toolbars to show the Macros toolbar with two
buttons I created.
The problem seems to be that by customizing my toolbar in that worksheet (to
show the Macros toolbar, with my custom buttons), I made it so Excel always
shows that toolbar, even if those macros don't exist in the new worksheet.

I'm accustomed to Word's template file and being able to make different
templates and link documents to them. With that, I can open up one document
linked to one template and another document linked to another.
I see 'template files' for excel, but I don't see how you link a given
spreadsheet to the template.

Do you know if there's a way to set up Excel's toolbars and save a template
file such that when we open the workbook in the shared directory it shows
the 'special' toolbar, but when we open our own Excel documents it shows our
'usual' toolbars???

Thanks,
Shane
"kassie" (Change xxx to hotmail) wrote in message
...
Since you remove the other toolbars as part of your code, you have to
reinstate them before your sheet closes, possibly as part of your
Worksheet_BeforeClose event. By the same token, you have to remove the
custom toolbar, which you activated as part of opening your file. Not
knowing what exactly you created and removed, I am not clever enough to
quote
the code you should use.
--
Hth

Kassie Kasselman


"SV" wrote:

Greetings,
I'm using Excel 2003 and a while back I posted a request for how to do
some
calculations and combining. I got some great suggestions for macros and
implemented them. They work great, too!
So, I assigned them to toolbar buttons and removed most other toolbars
and
icons (Very limited application macros) so that when people use that
spreadsheet, they see exactly what they need, nothing more. I posted the
spreadsheet on our shared drive for everyone to use.

Unfortunately, it seems that now, no matter what spreadsheet I open, I
get
those toolbar buttons and the ones I removed for that one spreadsheet are
removed on my local Excel. I"m guessing I didn't save the macros as
'accessible only on that spreadsheet' or something, too.

So I have to wonder... how can I make the macros 'button accessible'
to
everyone but only on THAT spreadsheet?
Perhaps a way of adding a button to the spreadsheet itself?

Any ideas would be appreciated.

Thanks,
Shane







  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
SV SV is offline
external usenet poster
 
Posts: 15
Default Macros Not In Toolbars

Kassie,
I do apprecaite the info, I'll take a look and dig in. I don't know much
about them, but I seem to have a knack for at least grasping the more simple
ones!

Shane

"kassie" (Change xxx to hotmail) wrote in message
...
You have correctly diagnosed your problem! Yes, if you manually create a
toolbar, it will be there until you remove it! Ideally, you should create
and activate custom toolbars or buttons through code on opening your
workbook, and then again remove them, using code. on closing your workbook
You can right click on the Excel logo (top left), click on View Code, in
the
right hand pane select Workbook in the left box, and a Workbook_open macro
will be initialised. You can paste the following there, between the name
and
End Sub


Dim tBar, newButton

'Delete CommandBar if it exists
On Error Resume Next
CommandBars("Special Task").Delete
On Error GoTo 0

'create CommandBar
CommandBars.Add Name:="Special Task"

'define an object variable to refer to the CommandBar
Set tBar = CommandBars("Special Task")

'add first button
Set newButton = tBar
.Controls.Add(Id:=2950)

'specify tooltip (name), macro to run, and status bar text for the
macro
With newButton
.OnAction = "AddInfo"
.Caption = "Add Info"
End With

'add next button.
Set newButton = tBar.Controls.Add

With newButton
.Caption = "Remove Information"
.OnAction = "RemoveInfo"
.FaceId = 278
.BeginGroup = True
End With

'display CommandBar, position on spreadsheet
tBar.Visible = True
With CommandBars("Special Task")
.Left = 200
.Top = 200
End With

Obviously this is sample code, and you will have to adapt to suit your
needs.

Then click on the down arrow of the box on the right, and select
Before_Close. After before close, and before end sub, enter the
following;

CommandBars("Special Task").Delete

to remove the toolbar. Not much ehlp if you do not know about macros
though! With more info from your part, maybe someone here will be able to
help you a lot better. By the way, this example was taken from Visual
Basic
Macros Made Easy.
--
Hth

Kassie Kasselman


"SV" wrote:

Kassie,
Hmm.. well... I didn't use much code beyond a macro to combine the
contents of a given cell. I'm too new to macros to even know what a
'beforeClose event is.
I did, however, customize the toolbars to show the Macros toolbar with
two
buttons I created.
The problem seems to be that by customizing my toolbar in that worksheet
(to
show the Macros toolbar, with my custom buttons), I made it so Excel
always
shows that toolbar, even if those macros don't exist in the new
worksheet.

I'm accustomed to Word's template file and being able to make different
templates and link documents to them. With that, I can open up one
document
linked to one template and another document linked to another.
I see 'template files' for excel, but I don't see how you link a given
spreadsheet to the template.

Do you know if there's a way to set up Excel's toolbars and save a
template
file such that when we open the workbook in the shared directory it shows
the 'special' toolbar, but when we open our own Excel documents it shows
our
'usual' toolbars???

Thanks,
Shane
"kassie" (Change xxx to hotmail) wrote in
message
...
Since you remove the other toolbars as part of your code, you have to
reinstate them before your sheet closes, possibly as part of your
Worksheet_BeforeClose event. By the same token, you have to remove the
custom toolbar, which you activated as part of opening your file. Not
knowing what exactly you created and removed, I am not clever enough to
quote
the code you should use.
--
Hth

Kassie Kasselman


"SV" wrote:

Greetings,
I'm using Excel 2003 and a while back I posted a request for how to do
some
calculations and combining. I got some great suggestions for macros
and
implemented them. They work great, too!
So, I assigned them to toolbar buttons and removed most other toolbars
and
icons (Very limited application macros) so that when people use that
spreadsheet, they see exactly what they need, nothing more. I posted
the
spreadsheet on our shared drive for everyone to use.

Unfortunately, it seems that now, no matter what spreadsheet I open, I
get
those toolbar buttons and the ones I removed for that one spreadsheet
are
removed on my local Excel. I"m guessing I didn't save the macros as
'accessible only on that spreadsheet' or something, too.

So I have to wonder... how can I make the macros 'button
accessible'
to
everyone but only on THAT spreadsheet?
Perhaps a way of adding a button to the spreadsheet itself?

Any ideas would be appreciated.

Thanks,
Shane











  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 515
Default Macros Not In Toolbars

If you do not succeed, post back!
--
Hth

Kassie Kasselman


"SV" wrote:

Kassie,
I do apprecaite the info, I'll take a look and dig in. I don't know much
about them, but I seem to have a knack for at least grasping the more simple
ones!

Shane

"kassie" (Change xxx to hotmail) wrote in message
...
You have correctly diagnosed your problem! Yes, if you manually create a
toolbar, it will be there until you remove it! Ideally, you should create
and activate custom toolbars or buttons through code on opening your
workbook, and then again remove them, using code. on closing your workbook
You can right click on the Excel logo (top left), click on View Code, in
the
right hand pane select Workbook in the left box, and a Workbook_open macro
will be initialised. You can paste the following there, between the name
and
End Sub


Dim tBar, newButton

'Delete CommandBar if it exists
On Error Resume Next
CommandBars("Special Task").Delete
On Error GoTo 0

'create CommandBar
CommandBars.Add Name:="Special Task"

'define an object variable to refer to the CommandBar
Set tBar = CommandBars("Special Task")

'add first button
Set newButton = tBar
.Controls.Add(Id:=2950)

'specify tooltip (name), macro to run, and status bar text for the
macro
With newButton
.OnAction = "AddInfo"
.Caption = "Add Info"
End With

'add next button.
Set newButton = tBar.Controls.Add

With newButton
.Caption = "Remove Information"
.OnAction = "RemoveInfo"
.FaceId = 278
.BeginGroup = True
End With

'display CommandBar, position on spreadsheet
tBar.Visible = True
With CommandBars("Special Task")
.Left = 200
.Top = 200
End With

Obviously this is sample code, and you will have to adapt to suit your
needs.

Then click on the down arrow of the box on the right, and select
Before_Close. After before close, and before end sub, enter the
following;

CommandBars("Special Task").Delete

to remove the toolbar. Not much ehlp if you do not know about macros
though! With more info from your part, maybe someone here will be able to
help you a lot better. By the way, this example was taken from Visual
Basic
Macros Made Easy.
--
Hth

Kassie Kasselman


"SV" wrote:

Kassie,
Hmm.. well... I didn't use much code beyond a macro to combine the
contents of a given cell. I'm too new to macros to even know what a
'beforeClose event is.
I did, however, customize the toolbars to show the Macros toolbar with
two
buttons I created.
The problem seems to be that by customizing my toolbar in that worksheet
(to
show the Macros toolbar, with my custom buttons), I made it so Excel
always
shows that toolbar, even if those macros don't exist in the new
worksheet.

I'm accustomed to Word's template file and being able to make different
templates and link documents to them. With that, I can open up one
document
linked to one template and another document linked to another.
I see 'template files' for excel, but I don't see how you link a given
spreadsheet to the template.

Do you know if there's a way to set up Excel's toolbars and save a
template
file such that when we open the workbook in the shared directory it shows
the 'special' toolbar, but when we open our own Excel documents it shows
our
'usual' toolbars???

Thanks,
Shane
"kassie" (Change xxx to hotmail) wrote in
message
...
Since you remove the other toolbars as part of your code, you have to
reinstate them before your sheet closes, possibly as part of your
Worksheet_BeforeClose event. By the same token, you have to remove the
custom toolbar, which you activated as part of opening your file. Not
knowing what exactly you created and removed, I am not clever enough to
quote
the code you should use.
--
Hth

Kassie Kasselman


"SV" wrote:

Greetings,
I'm using Excel 2003 and a while back I posted a request for how to do
some
calculations and combining. I got some great suggestions for macros
and
implemented them. They work great, too!
So, I assigned them to toolbar buttons and removed most other toolbars
and
icons (Very limited application macros) so that when people use that
spreadsheet, they see exactly what they need, nothing more. I posted
the
spreadsheet on our shared drive for everyone to use.

Unfortunately, it seems that now, no matter what spreadsheet I open, I
get
those toolbar buttons and the ones I removed for that one spreadsheet
are
removed on my local Excel. I"m guessing I didn't save the macros as
'accessible only on that spreadsheet' or something, too.

So I have to wonder... how can I make the macros 'button
accessible'
to
everyone but only on THAT spreadsheet?
Perhaps a way of adding a button to the spreadsheet itself?

Any ideas would be appreciated.

Thanks,
Shane










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
Saving custom toolbars with macros to work on other computers jpw48 Excel Discussion (Misc queries) 11 August 29th 07 01:09 AM
Macros Don't Show On Commands List and 'Normal.dot' SV Excel Worksheet Functions 3 December 13th 06 07:23 PM
Macros and Toolbars Bec Excel Discussion (Misc queries) 7 January 23rd 06 02:54 PM
Transferring toolbars and macros to other machines Darrell Excel Discussion (Misc queries) 2 October 14th 05 10:03 PM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM


All times are GMT +1. The time now is 06:55 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"