Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Central Macro Workbook

Is there any way to have one central workbook of macros for an entire office?
I am writing a series of formating and quoting macros for my office, but
will not be able to go to each person's computer to copy the code and make
the nessicary toolbar additions. Even if we don't "share" a work book, I
need to find a way to get the code distributed, any and all suggestions would
be much appreciated!

P.S. My office is still using Office 2000 SP3.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Central Macro Workbook

Nice article, but it looks like I'd still need to manually install the macro
on each user's PC. Would an add-in file also contain custom toolbars?

"Bob Phillips" wrote:


http://support.microsoft.com/default.aspx?kbid=211563
How to create an add-in file in Excel 2000



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Nicholas Wautier" <Nicholas wrote in
message ...
Is there any way to have one central workbook of macros for an entire

office?
I am writing a series of formating and quoting macros for my office, but
will not be able to go to each person's computer to copy the code and make
the nessicary toolbar additions. Even if we don't "share" a work book, I
need to find a way to get the code distributed, any and all suggestions

would
be much appreciated!

P.S. My office is still using Office 2000 SP3.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Central Macro Workbook

It can do. The normal approach is to add the toolbars on workbook_open. Here
is some simple code example, but as you say, it does need installing, but
that is simple, and can be done from a server.

Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Application.CommandBars("myToolbar").Delete
On Error GoTo 0
End Sub

Private Sub Workbook_Open()
Dim oCB As CommandBar
Dim oCtl As CommandBarControl

On Error Resume Next
Application.CommandBars("myToolbar").Delete
On Error GoTo 0

Set oCB = Application.CommandBars.Add(Name:="myToolbar",
temporary:=True)
With oCB
Set oCtl = .Controls.Add(Type:=msoControlButton)
With oCtl
.BeginGroup = True
.Caption = "savenv"
.OnAction = "savenv"
.FaceId = 27
End With
Set oCtl = .Controls.Add(Type:=msoControlButton)
With oCtl
.Caption = "savemyprog"
.OnAction = "savemyprog"
.FaceId = 28
End With
Set oCtl = .Controls.Add(Type:=msoControlButton)
With oCtl
.Caption = "macro4"
.OnAction = "macro4"
.FaceId = 29
End With
Set oCtl = .Controls.Add(Type:=msoControlButton)
With oCtl
.Caption = "dater"
.OnAction = "dater"
.FaceId = 30
End With
.Visible = True
.Position = msoBarTop
End With

End Sub


'To add this, go to the VB IDE (ALT-F11 from Excel), and in
'the explorer pane, select your workbook. Then select the
'ThisWorkbook object (it's in Microsoft Excel Objects which
'might need expanding). Double-click the ThisWorkbook and
'a code window will open up. Copy this code into there,
'changing the caption and action to suit.

'This is part of the workbook, and will only exist with the
'workbook, but will be available to anyone who opens the
'workbook.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Nicholas Wautier" wrote in
message ...
Nice article, but it looks like I'd still need to manually install the

macro
on each user's PC. Would an add-in file also contain custom toolbars?

"Bob Phillips" wrote:


http://support.microsoft.com/default.aspx?kbid=211563
How to create an add-in file in Excel 2000



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Nicholas Wautier" <Nicholas wrote in
message ...
Is there any way to have one central workbook of macros for an entire

office?
I am writing a series of formating and quoting macros for my office,

but
will not be able to go to each person's computer to copy the code and

make
the nessicary toolbar additions. Even if we don't "share" a work

book, I
need to find a way to get the code distributed, any and all

suggestions
would
be much appreciated!

P.S. My office is still using Office 2000 SP3.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Central Macro Workbook

I have a similar situation.

I created a template with multiple sheets and it is accessible on a network
P2P drive. I created the macros and toolbar and the add-in and saved the .xlt
and addin file to a folder accessible to all. When I start the .xlt from
another machine I get the toolbar fine but the macros are not visible when I
alt-F8. Do I need to export them to somewhere from the computer Im creating
them on?

Andrew

"Nicholas Wautier" wrote:

Is there any way to have one central workbook of macros for an entire office?
I am writing a series of formating and quoting macros for my office, but
will not be able to go to each person's computer to copy the code and make
the nessicary toolbar additions. Even if we don't "share" a work book, I
need to find a way to get the code distributed, any and all suggestions would
be much appreciated!

P.S. My office is still using Office 2000 SP3.

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
Central Address Database skinny Excel Worksheet Functions 0 March 13th 06 07:23 AM
central update flow23 Excel Discussion (Misc queries) 10 January 17th 06 03:46 PM
Excel VBA Merge Workbook tables Central table [email protected] Excel Discussion (Misc queries) 1 January 15th 06 03:16 PM
use central formula on many worksheets, central affect allsheets MidNiteRaver Excel Worksheet Functions 0 July 25th 05 06:08 PM
Link multiple spreadsheets to one central spreadsheet using a macro Amanda[_5_] Excel Programming 1 August 18th 04 09:59 PM


All times are GMT +1. The time now is 12:07 AM.

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"