LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default called macro

By default if you do not specify public or private then it's public.

Sub Whatever()
is exactly the same as
Public Sub Whatever()

I personally always specify whether it is public or private. That way I know
that I took the time to actually think about what would be the appropriate
designation for the sub or function...
--
HTH...

Jim Thomlinson


"FSt1" wrote:

hi
2 ways.
1. store the macros a file called personal.xls and save it to the xlstart
folder.
i am using xp and the xlstart folder is located at ...
c:\program files\microsoft office\Office 10\xlstart\
it varies per ref level. the personal.xls file is hidden and opens when xl
opens and all macros in the personal file are available to use anywhere,
anytime.
this is how i do it and have been for 12~+ years. you can assign the macros
to sheet command buttons, toolbar icons or just run them from the menu tree...
tools\macro\macros....
you can also use the call command.
2. instead of a personal.xls file, make it and addin. works but i have never
used this technique so i can't say much about it.
as to public or private...
all of my macros in my personal.xls are just plain ol', run-of-the-mill subs.
public or private are optional. in vb help, type the word "sub" then click
on "calling subs and function procedures." it will explain the difference.
but as to my personal macros, "sub" does the trick.

hope this helped.
regards
FSt1



"Rick" wrote:

Where does one store a called macro that would be used by many excel
programs? And how is this procedure done, as well as how is the macro coded
Public or Private?



 
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
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
Solver does not solve when called from a macro mjd918 Excel Programming 3 January 19th 06 02:48 PM
Worksheet_Change sub does not trigger a called macro herman Excel Programming 3 February 8th 04 08:30 PM
Keeping name of worksheet who called macro Dkline[_2_] Excel Programming 3 January 30th 04 06:40 PM
which FormField called a macro? Juggernath[_2_] Excel Programming 0 January 15th 04 12:58 PM


All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"