UDFs/Macros in workbook

I am confused concerning where UDFs and/or macros must be located so that
they will available to someone that I send the workbook to.
Can they be in an add-in?
Can they be in my Personal.xls file?
Must they be in a module of the workbook?

Thanks
Brian Tozer


0
briantoz (102)
12/22/2003 4:16:15 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
427 Views

Similar Articles

[PageSpeed] 33

Brian

UDF's and Macros can reside in a General Module in the workbook you send.

They could be in an Add-in which you would also send.

Personal.xls is not a great idea since you would have to send that along with
the workbook and the user may have his/her own Personal.xls which you would
not want to overwrite or cause conflicts with.

Gord Dibben Excel MVP

On Tue, 23 Dec 2003 05:16:15 +1300, "Brian Tozer" <briantoz@ihug.co.nz> wrote:

>I am confused concerning where UDFs and/or macros must be located so that
>they will available to someone that I send the workbook to.
>Can they be in an add-in?
>Can they be in my Personal.xls file?
>Must they be in a module of the workbook?
>
>Thanks
>Brian Tozer
>

0
Gord
12/22/2003 5:09:56 PM
Gord Dibben wrote:

> They could be in an Add-in which you would also send.

Thanks Gord.
Would this require sending the xla file as a seperate file that the user
would have to save in the correct place on their HD, or could it be
incorporated into the .xls file somehow?
I assume the former, so it seems that the obvious solution is to include
them in a module in the workbook and keep add-in and Personal.xls components
for the ones that only I will use.
Right?

Thanks for your help as always.
Brian Tozer


0
briantoz (102)
12/22/2003 6:40:59 PM
Brian

In-line..........

On Tue, 23 Dec 2003 07:40:59 +1300, "Brian Tozer" <briantoz@ihug.co.nz> wrote:

>Gord Dibben wrote:
>
>> They could be in an Add-in which you would also send.
>
>Thanks Gord.
>Would this require sending the xla file as a seperate file that the user
>would have to save in the correct place on their HD, or could it be
>incorporated into the .xls file somehow?

Add-in sent as well as workbook.  Saved in correct place on their HD.

>I assume the former, so it seems that the obvious solution is to include
>them in a module in the workbook

If the macros are only for that particular workbook, leave them with the
workbook.  Just make sure there are no hard-coded pathnames in any routines
that would have to be adjusted by the users.

>and keep add-in and Personal.xls components
>for the ones that only I will use.
>Right?

That's the route I would use.
>
>Thanks for your help as always.
>Brian Tozer
>

Gord

0
Gord
12/22/2003 9:44:04 PM
Reply:

Similar Artilces:

Share Workbooks and Comments #2
Can anyone help me with this one... I have a simple spreadsheet which is shared and resides on a server. Apprx 6 people access and modify the sheet and save their modifications back to the server. No 2 people ever change the same cell so there are never any conflicts. The problem I have is that often the comments in a cell do not upload to the server. The user is unaware of this util he closes and re-opens the workbook to find that all of his changes have been saved but none of his comments. I have been getting the users to make their own copy at the end of the day and if they e-mail that c...

Workbook Protection on a Shared Workbook
Is there some way that I can password protect a an xl workbook that is also shared. The intention is to have a file that calculates freight rates available to marketers without them stuffing up the formulas in it. I know how to protect certain cells from being edited and others ok for input but not sure about how to prevent the salesmen from editing the formulas. Any ideas anyone? Regards Mark Mark, The protection you need is worksheet protection (Tools - Protect - Protect sheet). That is independent of sharing the workbook. Sheet protection is a two-step process. First unlock t...

Macro in Excel
I read an Excel workbook from C# code and want to know whether there exist a macro in it or not. Can someone give me pointer how can I find it. THanks, Shrish The file is opened in the binary mode, and the existence of the following values is checked. 56 42 5F 4E 61 6D Actually I am trying to use the following code: I am having an exception while adding an Excel Macro using C#. I use the following code to check for a macro. 1. Excel.Application xl = null; 2. Excel._Workbook wb = null; 3. Excel._Worksheet sheet = null; 4. VBIDE.VBComponent module = null; 5. string Macro = "ass...

cell reference changes after macro runs
I have two workbooks with simple identical formulas that update control number after the macro runs. One workbook is ok. The other wil not update the control number. Instead, it changes the cell referenc to one row higher and returns the previous control number. Here's wha each workbook looks like: Sheet one: cell C7 is the control number:20040004.formula for C7 i :=sheet2!'B5+1' Macro: Insert new row 5 on sheet 2,cut data from sheet 1 row 7, past into sheet 2 row 5. After the macro runs, the cell ref. on sheet 1, C7 changes to =B6+1. tried adding $ around $B5$+1, locking cel...

linked workbooks #6
I am trying to create a national network of schedules that includes many small route segments. Each segment is a separate workbook and each route has two worksheets, one for each direction. All times are calculated using Excel's time formulas. Now the fun begins, I am trying to link all these together showing possible connecting service using the link function in Excel. All the links use the absolute feature. So now when I add a column or delete a row, everything gets messed up. Is there a way to make sure the link stays with the original cell it was linked to even when that cell is...

Excel 1004 Error When Pasting Special W/ Macro
Hi all, I'm looking for some help with this macro...it has me really confused because it was working earlier, but now it hangs on this line of code (it is asterisked below) Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False This macro runs when the workbook opens and copies the contents of one sheet and pastes only the values to another sheet. The range that is being copied from and pasted to are both the same size. I have also tried this by selecting the upper-leftmost cell in the area I want to paste to but it has ...

How do I keep excel chart "data table" formats in several workbook
I have 1 workbook with the source data that creates serveral charts. The charts have been formated to show "data tables" containing both dollars and percents. I want to take the graphs and split up to various excel workbooks. When I copy the graph tab from the source file into the new workbook, I lose the formatting on the "data tables." Is there a way to copy the graphs to new workbooks while retaining the "data table" formats? I would prefer to not have to maintain the source data within each of the workbooks. The goal is to update the source file wh...

how do I find out how to delete a macro from a document
I have a dot (document template) that has created a file for me and I have save the resulting document as a ".doc" not a ".dot" Now everytime I try and open up the doc it asks me if I want to enable macros or disable macros.. is there anyway to delete the link from the dot to doc that it created? Hi Doman You can change the link from the .doc to its template using Tools > Templates and Add-ins. If you don't want the document to be attached to any specific template, attach it to Normal.dot. If you do this you will also lose access to any toolbars, AutoTexts and ...

How to change to active sheet on macro?
Does anyone have any suggestions on how to modify following coding? which work on active sheet rather than specific sheet ("ABC"). Application.Goto Sheets("ABC").Range("I45"), scroll:=True Thanks in advance for any suggestions Eric Application.Goto activesheet.Range("I45"), scroll:=True Eric wrote: > > Does anyone have any suggestions on how to modify following coding? which > work on active sheet rather than specific sheet ("ABC"). > Application.Goto Sheets("ABC").Range("I45"), scroll:=True > ...

Looking for a macro
A B C D 1 Name Tel no Name Tel no 2 Aashiq 6540029 Dawoodi 2402582 3 Fakhri 2438362 Aashiq 9809748 4 Fatemi 2448319 Abbas 7993640 5 Hozefa 2416985 6 Kutabi 2451009 THE ABOVE IS A SAMPLE DATA Cell (A&B) is one group and (C&D) is another group. Imagine, more datas will be added daily in each group. and I need a macro to run so the it will identify automatically the last row of e...

Looking for a macro to automatically generate numbers in "cut-stack" order...
Hi, I need to create a macro which will automatically number a range of tickets in "cut-stack" order. Another way this might be worded is, given "nnn" sheets of paper, the order of each ticket number is sequential on each subsequent sheet of paper. When the paper is cut the stacks can be placed on top of each order to get a complete set of numbered tickets. For example, to number from 1 to 200 in stacks of 8, the first page contains the following sequence of numbers: 1, 26, 51, 76, 101, 126, 151, 176 and the second page contains the following sequence of numbers: 2, 27, 5...

Hyperlinks to sheets in a workbook
I inherited a workbook with 20 tabs, that has hyperlinks on the firs tab to most of the other tabs. I have added a new tab, and change the name of one of the tabs. However, I cannot figure out how t make the hyperlinks work for these two pages. When I do the "Edi Hyperlinks" procedure I get a list of the tabs in the workbook --- bu not all of them . . . so I need to know how to get my tab names to sho on that list. I've tried reading some of the other postings, but none of them dea with my problem. I am not familiar with VBE (?) programming . . . and wouldn't kno...

Macro error 5941
Hello! I am trying to write a macro to insert a header with one of the standard building block entry headers in the quick parts list. When I try, I get the error messge 5941. From reading other posts I can tell it cannot find the building blocks template - this is confusing since they are the default entries and I can use them while not in a macro - so it would seem word knows where the building blocks template is. hmm .... help would be so appreciated. Here is the code: Sub insert_header2() ' ' insert_header2 Macro ' dianne recorded ' If ActiveWindow...

Selecting shapes with a macro
In a powerpoint macro what's the elegant way of selecting everything on a slide except the title? (for pasting into another presentation with a different page size, in case you're interested). Grateful for suggestions. In article <4074BEB1-E641-441A-9389-0CE07C0DB509@microsoft.com>, Simonc wrote: > In a powerpoint macro what's the elegant way of selecting everything on a > slide except the title? (for pasting into another presentation with a > different page size, in case you're interested). Elegance is in the eye of the beholder, so you'll...

AutoSafe and macro recording
Hi! When I was recording a macro recently, AutoSafe kicked in. It, too, wa saved in the macro! It's not difficult to edit it out, but I wondered if there is a way o avoiding it (other than the obvious one of switching AutoSafe off fo the duration of recording). Al -- Message posted from http://www.ExcelForum.com ...

ECHO OFF in Access Macro?
Hi: Is there a way to turn echo off and on in an access macro? I know you can do it with VBA, but in this applications it not desirable to complicate it with VBA since neophytes will be maintaining it. Thanks John Baker On Sun, 19 Aug 2007 15:28:24 -0000, JHB wrote: > Hi: > > Is there a way to turn echo off and on in an access macro? I know you > can do it with VBA, but in this applications it not desirable to > complicate it with VBA since neophytes will be maintaining it. > > Thanks > > John Baker I don't understand this post. It took me 2 seconds t...

HELP
I have developed a Workbook with 320 sheets, all linked to a summary page and back to individual sheets. Each sheet contains 11 formulas and no other special features. The file size is 2.6MB. PROBLEM - When I selected Share Workbook, Allow multi users - it gave me the Error Message:"The instruction at 0x00660065 referenced at 0x00660065. The memory could not be "read" Click on OK to terminate the program Click on CANCEL to debug. When I select ether, it crashes MS Excel. This Workbook was created using MS Excel 97 on a Dell Desktop. PLEASE HELP This Workbook was ...

How do I open each workbook in it's own version of Excel?
Previously when I opened multiple workbooks each opened in it's own application and I could view them seperately. Now they all open under the same version and I have to select individually under windows. Please let me know what I have changed. Hi Tools>Options Windows in taskbar -- Regards Ron de Bruin http://www.rondebruin.nl "RKOCT" <RKOCT@discussions.microsoft.com> wrote in message news:5FB28A6D-E81B-4602-8367-B05B54AD2276@microsoft.com... > Previously when I opened multiple workbooks each opened in it's own > application and I could view them sep...

starting excel file with a macro
hey, i need to make a macro that will run automatic everytime i start an excel file. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Hi Name it Sub Auto_open() -- HTH. Best wishes Harald Followup to newsgroup only please "a_d66" <a_d66.w1mvz@excelforum-nospam.com> skrev i melding news:a_d66.w1mvz@excelforum-nospam.com... > hey, > i need to make a macro that will run automatic everytime i start an > excel file. > > > > ----------...

How to copy macro from template into document programaticaly?
There is one template. By this template I'm creating new document. I need to copy one macro from this template into this document into module ThisDocument. How? Thank you. Just one macro? There are others that you do NOT want copied over? You do know, I assume, that procedures in a template can be used in a document cloned from that template - as long as the .DOT file is available. To answer your question though, you could put that procedure into a exported file (as a separate module perhaps), and then as part of your template Document_New(), import that file into the newly c...

Wanted: Data Analysis Workbook
Hi All, I am generating large amounts of data that need to be analyzed on the fly. To simplify the problem, consider an Excel workbook that has n number of data sheets, S1 to Sn. Each spreadsheet has 5 columns, C1 to C5 and x number of rows, R1 to Rx, in addition to the a header row. The workbook also has one main sheet called Smain. The workbook should be capable of doing the following automatically, either by pressing a button or auto-refresh when the data is updated: 1. The rows of each data sheet should be sorted max to min according to C3. 2. If the maximum value in C3 of a given sheet...

Excel Workbook Protection
I have protected my workbook and can't remember the password. Is there any way to recall, or override the protection? There are plenty of password crackers available on the web. Googling Excel Password Cracker would be a good start, though you may need to pay for your poor memory ;-) HTH, Bernie MS Excel MVP "E Lane" <ELANE@EASTCOASTFRUIT.COM> wrote in message news:1daf301c45460$09d05ba0$a101280a@phx.gbl... > I have protected my workbook and can't remember the > password. Is there any way to recall, or override the > protection? ...

Loop macro #2
Does anyone know of a way to loop a macro so it runs twice -- Message posted from http://www.ExcelForum.com -- Message posted from http://www.ExcelForum.com If you add the following at the start and end of your code: sub Loopy for i = 0 to 1 Code ------------------- next i end sub For more information look at the excel help- try searching for "Do Loop" and looking at "see also" for the various options you have. Duncan 'excel.duncan-fiona.co.uk' (http://www.excel.duncan-fona.co.uk -- Message posted from http://www.ExcelForum.com Lik...

how do i open a second workbook automatically
i have tried all of the following Double click 'This WorkBook' and paste the below code to the right code pane. Private Sub Workbook_Open() Workbooks.Open Me.Path & "\data.xls" End Sub Private Sub Workbook_Open() Workbooks.Open ("C:\data.xls") End Sub > Private Sub Workbook_Open() > Workbooks.Open Filename:="D:\lorne stewart\timesheet\2008\data.xls" > End Sub i have several answers but none work What do you mean when you say it doesn't work? Do you get an error message or does nothing seem to happen at all? If ...

Office Macros
What is the latest about when we will be able to upgrade our Office for Mac so that it can run all of our spreadsheets with VB macros? -- "In no part of the constitution is more wisdom to be found, than in the clause which confides the question of war or peace to the legislature, and not to the executive department." - James Madison The only official word from Microsoft is that VBA will return in the next release of Mac Office which is tentatively scheduled for "Holidays 2010" - I take that to mean late 4th quarter of next year. I would not expect to see anything m...