Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Saving the Macro for all workbooks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pranay Shah - 09 Jul 2007 09:34 GMT
Hi,

I have a code which I have wrtitten seperately which now I to be accessible
by all workbooks, I have heard that there is a hidden file where we can save
this, but I am not able to find it, can anyone please guide me how to go
about it.
Signature

Regards,
Pranay Shah

Bob Phillips - 09 Jul 2007 09:51 GMT
Personal.xls.

Personal.xls is located in the XLStart directory, and is used to store
macros and
things that you want to be available to all workbooks, whenever you start
Excel.

By default, it  is hidden in Excel, but if you go to the VBE, you use it as
you can
with any other open workbook (you don't have to unhide it).

You can create it by
- goto Tools>Macros>Record New Macro...
- Choose Personal Macro Workbook form the dropdown
- OK
- click the Stop button on the toolbar that pops-up

You now have a Personal.xls workbook. It is not visible though, it is hidden
by default (Windows>Unhide)

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi,
>
[quoted text clipped - 4 lines]
> this, but I am not able to find it, can anyone please guide me how to go
> about it.
Pranay Shah - 19 Jul 2007 05:38 GMT
Hi Bob,

Thanks for the replying back. I was able to find the Personal.xls file and i
had added the code in the module also but when i tried to use it some other
workbook it didn't worked.

Can you please help me out how to go about it.
Signature

Regards,
Pranay Shah

> Personal.xls.
>
[quoted text clipped - 24 lines]
> > this, but I am not able to find it, can anyone please guide me how to go
> > about it.
Bob Phillips - 19 Jul 2007 08:48 GMT
If you want to use a macro in another workbook, you need Application.Run

Application.Run "Personal.xls!test_macro"

... with parameters

Application.Run "Personal.xls!test_macro", 4, 8

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi Bob,
>
[quoted text clipped - 37 lines]
>> > go
>> > about it.
Pranay Shah - 19 Jul 2007 12:58 GMT
Hi Bob,

How do I use the Application.Run and where do i add this in my workbook?
Sorry, I new to this field so please bear with me. :)

Thanks.
Signature

Regards,
Pranay Shah

> If you want to use a macro in another workbook, you need Application.Run
>
[quoted text clipped - 45 lines]
> >> > go
> >> > about it.
Bob Phillips - 19 Jul 2007 13:14 GMT
where you are currently trying to call the macro

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi Bob,
>
[quoted text clipped - 57 lines]
>> >> > go
>> >> > about it.
Dave Peterson - 19 Jul 2007 13:33 GMT
If you're trying to use a function that you created and stored in personal.xls
in a cell in a worksheet, you'd use something like:

=personal.xls!yourfunctionnamehere(...)

> Hi Bob,
>
[quoted text clipped - 45 lines]
> > > Regards,
> > > Pranay Shah

Signature

Dave Peterson

Gord Dibben - 19 Jul 2007 21:11 GMT
Pranay

Create an Add-in with your macros.

Then load the add-in through Tools>Add-ins.

You won't have to use the Personal.xls! or Application.Run method

Gord Dibben  MS Excel MVP

>If you're trying to use a function that you created and stored in personal.xls
>in a cell in a worksheet, you'd use something like:
[quoted text clipped - 50 lines]
>> > > Regards,
>> > > Pranay Shah
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.