Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Daniel Lees
 
Posts: n/a
Default Copying a button with code into another workbook

Hi

I have about 400 individual workbooks that i want to add a button with the
same code into each book is there any way to do this without going in and
recording the macro in each workbook. The workbooks are shared over the
network so i can't use my personal workbook i want to copy the button and
code into each workbook quickly. Can any1 help me?

Cheers

Danny
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Chip Pearson has some code that shows how to do this kind of thing:
http://www.cpearson.com/excel/vbe.htm

But if you're adding that same button with the same code to 400 workbooks, it
might be simpler to create a toolbar in an addin and give the users a button on
that toolbar that will run your code.

Have the users open the addin whenever they need that function.

One of the nice things about separating your code from your data is if you have
to update that macro--to fix a mistake or to add more functionality. You'll
only have one spot to fix--instead of 400 (plus the copies the users made but
didn't tell you about!).

Here's how I make that toolbar:
http://groups.google.co.uk/groups?th...5B41%40msn.com

Daniel Lees wrote:

Hi

I have about 400 individual workbooks that i want to add a button with the
same code into each book is there any way to do this without going in and
recording the macro in each workbook. The workbooks are shared over the
network so i can't use my personal workbook i want to copy the button and
code into each workbook quickly. Can any1 help me?

Cheers

Danny


--

Dave Peterson
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
Using other workbooks.. DavidMunday Excel Worksheet Functions 2 July 1st 05 07:35 AM
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM
Copying a workbook with custom toolbar assigned to a macro Matt W Excel Discussion (Misc queries) 1 February 4th 05 10:46 PM
Unprotect Workbook Kent Excel Discussion (Misc queries) 1 February 4th 05 01:07 AM
Hot Button Lookup DBuche Excel Worksheet Functions 0 February 2nd 05 09:27 PM


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