Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Having a macro/function available in new spreadsheets

Hi everyone,

I wanted to define a function that would be available in all new
spreadsheets that I create from now on, so I defined a macro in the Personal
workbook (Personal.xlsb) and then manually pasted the code of function I
needed into the macro, such that the code of the macro looked something like
this:

Function functionName
...
End Function

After saving, hiding Personal.xlsb (from View|Hide) and restarting Excel, I
noticed that new spreadsheets did not know of this new function that I
created; the function was only available in Personal.xlsb itself, upon
unhiding it from the View menu.

I have to say that I am a rookie when it comes to macros&VBA, so I might be
making some pretty blatant confusions here between macros and functions. Can
anyone suggest how to make that function be universally available in all
spreadsheets (at least in those created from now on, if not also in
pre-exsiting ones)? Many thanks for any replies!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Having a macro/function available in new spreadsheets

Hi,

Cal your function like this

=PERSONAL.XLSB!Function_Name()

Or have a look here

http://www.rondebruin.nl/personal.htm
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"wildetudor" wrote:

Hi everyone,

I wanted to define a function that would be available in all new
spreadsheets that I create from now on, so I defined a macro in the Personal
workbook (Personal.xlsb) and then manually pasted the code of function I
needed into the macro, such that the code of the macro looked something like
this:

Function functionName
...
End Function

After saving, hiding Personal.xlsb (from View|Hide) and restarting Excel, I
noticed that new spreadsheets did not know of this new function that I
created; the function was only available in Personal.xlsb itself, upon
unhiding it from the View menu.

I have to say that I am a rookie when it comes to macros&VBA, so I might be
making some pretty blatant confusions here between macros and functions. Can
anyone suggest how to make that function be universally available in all
spreadsheets (at least in those created from now on, if not also in
pre-exsiting ones)? Many thanks for any replies!

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
Macro for Multiple Spreadsheets [email protected] Excel Discussion (Misc queries) 1 March 1st 08 12:58 AM
Using a macro to open spreadsheets Tristan Excel Discussion (Misc queries) 2 June 21st 07 04:09 PM
Opening New Spreadsheets - Always getting Macro Msg. Launchnet Excel Discussion (Misc queries) 4 June 14th 07 03:27 PM
Printing spreadsheets macro GarToms Excel Discussion (Misc queries) 5 February 8th 06 03:11 PM
Combine two spreadsheets using Macro jlogsdon Excel Worksheet Functions 0 May 23rd 05 11:14 PM


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