Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default how do I make a simple macro

I'd like to create a simple macro that I can give to other
people and that they can load and assign to a button. How
do I do that without creating a project? Or do I have to
create a project? The macro I have in mind consists of
just a few lines I need to automate a couple of processes,
nothing fancy.

mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default how do I make a simple macro

The easiest way is just to use the Macro Recorder (ToolsMacroRecord New
Macro). Walk through the steps you want a few times first, just to make
sure you have everything lined out right and you're not going to miss
anything. Then launch the recorder. When the recorder pops up, name the
macro and save it in your Personal.XLS.

After you're done and you close the recorder, you can hit ALT+F11; that
opens the VBA Editor. If it doesn't open to your macro, you can go to
ToolsMacros and select it from the list. If you copy everything from "Sub
[MacroName]()" to "End Sub", you can paste it into any text editor and email
it. I'd also recommend saving it as a separate document - if you wind up
making changes and something goes bad, you can always restore it.

If you run into any snags, let us know. If the code doesn't work, copy it
and paste it into a post back here. Tell us what you were trying to
accomplish and what the macro did/didn't do instead, and most likely someone
here can help.

Good luck!
Ed

"mike" wrote in message
...
I'd like to create a simple macro that I can give to other
people and that they can load and assign to a button. How
do I do that without creating a project? Or do I have to
create a project? The macro I have in mind consists of
just a few lines I need to automate a couple of processes,
nothing fancy.

mike



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how do I make a simple macro

Macros are stored in workbooks. You can create it and export it to a bas
file, but to run it, it must be in a workbook.

--
Regards,
Tom Ogilvy

"mike" wrote in message
...
I'd like to create a simple macro that I can give to other
people and that they can load and assign to a button. How
do I do that without creating a project? Or do I have to
create a project? The macro I have in mind consists of
just a few lines I need to automate a couple of processes,
nothing fancy.

mike



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how do I make a simple macro

As far as I know, you'll have to create an Excel Workbook, Template, or Addin to distribute your macro. Using a Template is probably the easiest way.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default how do I make a simple macro

These two sites have good information on how to create a macro.

David McRitchie
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Tushar Mehta
http://www.tushar-mehta.com/excel/vb...rder/index.htm

If you wish to share your macros, here are a couple of links that
offer solutions.

http://www.google.com/groups?hl=en&l...628a6f4&rnum=6
http://www.google.com/groups?hl=en&l...3622aa&rnum=16
http://www.google.com/groups?hl=en&l...719adb4&rnum=1

I usually transfer by exporting the module that contains the macros
and then importing the module.


HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

I'd like to create a simple macro that I can give to other
people and that they can load and assign to a button. How
do I do that without creating a project? Or do I have to
create a project? The macro I have in mind consists of
just a few lines I need to automate a couple of processes,
nothing fancy.

mike


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
how do i make a simple spread sheet Tomishere57 Excel Discussion (Misc queries) 2 May 22nd 10 07:20 PM
HELP!!! I need to make a simple formula! teacher206 Excel Discussion (Misc queries) 6 January 9th 10 05:19 PM
Make it Simple! Dan the Man[_2_] Excel Worksheet Functions 8 July 16th 07 03:46 AM
Make formula more simple --- array? Nikki Excel Discussion (Misc queries) 6 April 11th 07 07:21 PM
Make it more simple or intuitive to do simple things Vernie Charts and Charting in Excel 1 March 16th 05 04:01 AM


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