ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Macro (https://www.excelbanter.com/excel-programming/370619-excel-macro.html)

[email protected]

Excel Macro
 
how can I move all the macro code to one single location from the excel
template. Basically this what i need to accomplish.
Currently my excel template has all the codes/macros .
Everytime I change the macro code, I need to send out the new
template to everyone on the group as a new version.
Is there a way where i can simply change my macro code in one
location, and template always look at this place..


NickHK

Excel Macro
 
If everyone sets their "Workgroup Templates" to the same path, then they
will see the same single version of your template each time. This is an
Office wide setting.
Whilst this setting is available in the WordToolsOptionsFile Locations,
bizarrely it's not included in Excel's Options.
You can either set from Word or in code with:
Application.NetworkTemplatesPath=YourNetworkPathTo TemplateFolder

Or possible add/edit the registry value of SharedTemplates at
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Co mmon\General

All this assume all your users are on a network where they can all see the
same folder somewhere.

NickHK

wrote in message
oups.com...
how can I move all the macro code to one single location from the excel
template. Basically this what i need to accomplish.
Currently my excel template has all the codes/macros .
Everytime I change the macro code, I need to send out the new
template to everyone on the group as a new version.
Is there a way where i can simply change my macro code in one
location, and template always look at this place..




[email protected]

Excel Macro
 
Hi,

Do you mean move or copy the codes...
if you just want to copy why you dont use export code module ?
like this:
Sub exportmodule()
ThisWorkbook.VBProject.VBComponents _
("module1").Export "C:\ExportedFile.bas"
End Sub

look at c:\

tks
Halim

NickHK menuliskan:
If everyone sets their "Workgroup Templates" to the same path, then they
will see the same single version of your template each time. This is an
Office wide setting.
Whilst this setting is available in the WordToolsOptionsFile Locations,
bizarrely it's not included in Excel's Options.
You can either set from Word or in code with:
Application.NetworkTemplatesPath=YourNetworkPathTo TemplateFolder

Or possible add/edit the registry value of SharedTemplates at
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Co mmon\General

All this assume all your users are on a network where they can all see the
same folder somewhere.

NickHK

wrote in message
oups.com...
how can I move all the macro code to one single location from the excel
template. Basically this what i need to accomplish.
Currently my excel template has all the codes/macros .
Everytime I change the macro code, I need to send out the new
template to everyone on the group as a new version.
Is there a way where i can simply change my macro code in one
location, and template always look at this place..




All times are GMT +1. The time now is 10:32 PM.

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