Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a Sub/Function global to ALL WorkBooks?
I am using Excel 2007 and XP. I wrote some subroutines and functions that I
would like to be able to use in ANY WorkBook. As a simple example function: Function aaa() aaa = "Results of this function" End Function -------------------------------------- In ANY Workbook: sub zzz() dim xxx as string xxx=aaa end sub I've been trying ADDins, XLSTART Folder, Personal.XLSB, setting references, but I seem to be missing something. Setting a reference to the workbook that contains the function (aaa) does work, but then how do you set the reference for ALL WorkBooks? Thanks for any insight, Art |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a Sub/Function global to ALL WorkBooks?
Each workbook will need to have the reference added.
Alternatively, you could use application.run, but then the workbook with the function will need to be opened (by your code???) first. ArtDeFart32 wrote: I am using Excel 2007 and XP. I wrote some subroutines and functions that I would like to be able to use in ANY WorkBook. As a simple example function: Function aaa() aaa = "Results of this function" End Function -------------------------------------- In ANY Workbook: sub zzz() dim xxx as string xxx=aaa end sub I've been trying ADDins, XLSTART Folder, Personal.XLSB, setting references, but I seem to be missing something. Setting a reference to the workbook that contains the function (aaa) does work, but then how do you set the reference for ALL WorkBooks? Thanks for any insight, Art -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a Sub/Function global to ALL WorkBooks?
I use DP's method, modified by having my Macrs.xls file in XLSTART, and
running code to open the main file of macros (in hidden mode) from the Macros.xls Auto Open. This keeps the Macros.xls file relatively clean, and distribution much easier "Dave Peterson" wrote: Each workbook will need to have the reference added. Alternatively, you could use application.run, but then the workbook with the function will need to be opened (by your code???) first. ArtDeFart32 wrote: I am using Excel 2007 and XP. I wrote some subroutines and functions that I would like to be able to use in ANY WorkBook. As a simple example function: Function aaa() aaa = "Results of this function" End Function -------------------------------------- In ANY Workbook: sub zzz() dim xxx as string xxx=aaa end sub I've been trying ADDins, XLSTART Folder, Personal.XLSB, setting references, but I seem to be missing something. Setting a reference to the workbook that contains the function (aaa) does work, but then how do you set the reference for ALL WorkBooks? Thanks for any insight, Art -- Dave Peterson . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
group workbooks/files to make global changes? | New Users to Excel | |||
Make function available to all workbooks? | Excel Programming | |||
Make global Macro/Add-in for all active Workbooks/Sheets | Excel Programming | |||
how to make a function(vb script) global (as in used from every w. | Excel Programming | |||
How to make a function accessible for all workbooks | Excel Programming |