#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Export/Inport Macros

Hi,

I have two workbooks. One contains nearly all the macros being used by both
workbooks. I need to share these workbooks with other users and wish to make
each workbook's macros work whether or not the other workbook is open or not.

Do I need to export the macros from one workbook to the other?

Assuming the answer is YES, can I right click on the origin workbook
"Modules" heading and "Export" to the default filenames, then in the
destination workbook in Modules, right click and use "Inport"?

Is there a trap I need to know about?

Still learning as I go!

Many thanks in advance,
Brian


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default Export/Inport Macros

1. Set up a separate folder in Windows explorer to keep your modules.
Right-click on a module and select Export File.
To import a module, right-click the project name and select Import File.
-or-
2. The quickest way to copy a module is to simply click and drag it to
the other project. A copy is automatically created.
-or-
3. You can also Insert a new module in your project and then copy the
code from another module and paste it in the new module.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Tail Wind"
wrote in message
Hi,
I have two workbooks. One contains nearly all the macros being used by both
workbooks. I need to share these workbooks with other users and wish to make
each workbook's macros work whether or not the other workbook is open or not.

Do I need to export the macros from one workbook to the other?

Assuming the answer is YES, can I right click on the origin workbook
"Modules" heading and "Export" to the default filenames, then in the
destination workbook in Modules, right click and use "Inport"?

Is there a trap I need to know about?

Still learning as I go!

Many thanks in advance,
Brian


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Export/Inport Macros

hi
yes. a workbook has to be open to run it's macro. that is why some people
put macros in their personal workbook in the xl start folder so that the
macros will be available for all files. so in your case, i think you would
have to export.
and you're on the right track about import and export.
in the vb editor, expand the project and right click the macro, click export.
it will export as a bas file. I use to have a special folder for all of the
macros i had exported. to import, in the vb editor, right click the project
you want the macro in. click import. you may need to decide if it's a sheet
macro, workbook macro or just in a standard module.
good luck
Regards
FSt1
"Tail Wind" wrote:

Hi,

I have two workbooks. One contains nearly all the macros being used by both
workbooks. I need to share these workbooks with other users and wish to make
each workbook's macros work whether or not the other workbook is open or not.

Do I need to export the macros from one workbook to the other?

Assuming the answer is YES, can I right click on the origin workbook
"Modules" heading and "Export" to the default filenames, then in the
destination workbook in Modules, right click and use "Inport"?

Is there a trap I need to know about?

Still learning as I go!

Many thanks in advance,
Brian


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
Excel Inport External Data - new queries Lozza65 Excel Worksheet Functions 1 November 26th 07 10:55 AM
Inport Outlook emails into Excel Richard Excel Discussion (Misc queries) 0 November 29th 06 04:18 PM
How to inport works spreadsheet into excel 2007 Miro Excel Worksheet Functions 1 May 28th 06 05:55 PM
Inport from a variable file name shikamikamoomoo Excel Discussion (Misc queries) 1 March 22nd 06 12:29 AM
Inport of Microsoft Works Spreadsheets Perry Excel Discussion (Misc queries) 1 November 7th 05 02:53 AM


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