Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Ok i have a macro that is written in a template workbook. The idea i that the template is then copied into a variety of sheets and the macr is run to pick up various pieces of standing data, what i am strugglin with is a way of ensuring the macro stays with the sheet when it i copied into a new work book. Any ideas -- chalk ----------------------------------------------------------------------- chalky's Profile: http://www.excelforum.com/member.php...fo&userid=2375 View this thread: http://www.excelforum.com/showthread.php?threadid=56329 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put the macro inthe code module for the sheet that will be copied to the
other workbooks. The macro will be copied with the sheet. If your macro is a user-defined function which is called from the worksheet, the code must be in a VBA code module. The following link to Erlandsen Data Consulting's VBA site has code for copying a module from one workbook to another: http://www.erlandsendata.no/english/...vbavbecopytowb Hope this helps, Hutch "chalky" wrote: Ok i have a macro that is written in a template workbook. The idea is that the template is then copied into a variety of sheets and the macro is run to pick up various pieces of standing data, what i am struggling with is a way of ensuring the macro stays with the sheet when it is copied into a new work book. Any ideas? -- chalky ------------------------------------------------------------------------ chalky's Profile: http://www.excelforum.com/member.php...o&userid=23758 View this thread: http://www.excelforum.com/showthread...hreadid=563293 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to lookup a sheet, number, then display in origonal sheet | New Users to Excel | |||
macro to: Add new sheet, then rename new sheet with todays date | Excel Worksheet Functions | |||
Return to Current Sheet in On (sheet activate) event macro | Excel Programming | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions | |||
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet | Excel Programming |