RE: $$Excel-Macros$$ Macro to copy a macro from one workbook to another
Make an string of your Procedure and try this Application.Workbooks("Book2").VBProject.VBComponents("THisWOrkbook").CodeMo dule.AddFromString "YourString" HTH Regards Rajan verma +91 7838100659 [IM-Gtalk] From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Richard Sent: 25 June 2012 8:57 To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Macro to copy a macro from one workbook to another A child workbook is a 2nd, 3rd or 4th workbook created from the "master" with subsets of the data. The master may contain data for locations 1, 2, 3, and 4, whereas the first child workbook only location 1, the second location 2, etc. Within the first child workbook, I want to put in code in the "ThisWorkbook" section that with lock selected cells. I know how to write the code to do this, but not how to get it in the "Thisworkbook" section using my macro that creates the child workbooks. On Monday, June 25, 2012 5:55:52 AM UTC-7, Rajan_Verma wrote: Hi Richard, Please explain what is child workbook..? Regards Rajan verma +91 7838100659 [IM-Gtalk] From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Richard Sent: 25 June 2012 5:17 To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ Macro to copy a macro from one workbook to another I would like to create a macro to copy a macro from one workbooks module area to another workbooks "ThisWorkbook" area. The first workbook is the master and any other workbook would be subsets of the master. The idea is to have a macro that will further lock cells from input (sub workbook_open) on the child workbooks. Any help would be appreciated Rich -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com
Re: $$Excel-Macros$$ Macro to copy a macro from one workbook to another
A child workbook is a 2nd, 3rd or 4th workbook created from the "master" with subsets of the data. The master may contain data for locations 1, 2, 3, and 4, whereas the first child workbook only location 1, the second location 2, etc. Within the first child workbook, I want to put in code in the "ThisWorkbook" section that with lock selected cells. I know how to write the code to do this, but not how to get it in the "Thisworkbook" section using my macro that creates the child workbooks. On Monday, June 25, 2012 5:55:52 AM UTC-7, Rajan_Verma wrote: > > Hi Richard, > > Please explain what is child workbook..? > > > > > > * * > > *Regards* > > *Rajan verma* > > *+91 7838100659 [IM-Gtalk]* > > > > *From:* excel-macros@googlegroups.com [mailto: > excel-macros@googlegroups.com] *On Behalf Of *Richard > *Sent:* 25 June 2012 5:17 > *To:* excel-macros@googlegroups.com > *Subject:* $$Excel-Macros$$ Macro to copy a macro from one workbook to > another > > > > I would like to create a macro to copy a macro from one workbooks module > area to another workbooks "ThisWorkbook" area. > > > > The first workbook is the master and any other workbook would be subsets > of the master. The idea is to have a macro that will further lock cells > from input (sub workbook_open) on the child workbooks. > > > > Any help would be appreciated > > > > Rich > > -- > -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, > accurate thread titles. Poor thread titles, like Please Help, Urgent, Need > Help, Formula Problem, Code Problem, and Need Advice will not get quick > attention or may not be answered. 2) Don't post a question in the thread of > another member. 3) Don't post questions regarding breaking or bypassing any > security measure. 4) Acknowledge the responses you receive, good or bad. 5) > Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. NOTE : Don't ever post personal or confidential > data in a workbook. Forum owners and members are not responsible for any > loss. > -- > > To post to this group, send email to excel-macros@googlegroups.com To > unsubscribe, send a blank email to > excel-macros+unsubscr...@googlegroups.com > -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com
Re: $$Excel-Macros$$ Macro to copy a macro from one workbook to another
Create a “template” workbook for the child workbooks or do it from the master. A more detailed explanation of your problem may help. Don Guillett Microsoft MVP Excel SalesAid Software dguille...@gmail.com From: Richard Sent: Sunday, June 24, 2012 6:46 PM To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ Macro to copy a macro from one workbook to another I would like to create a macro to copy a macro from one workbooks module area to another workbooks "ThisWorkbook" area. The first workbook is the master and any other workbook would be subsets of the master. The idea is to have a macro that will further lock cells from input (sub workbook_open) on the child workbooks. Any help would be appreciated Rich -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com
RE: $$Excel-Macros$$ Macro to copy a macro from one workbook to another
Hi Richard, Please explain what is child workbook..? Regards Rajan verma +91 7838100659 [IM-Gtalk] From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Richard Sent: 25 June 2012 5:17 To: excel-macros@googlegroups.com Subject: $$Excel-Macros$$ Macro to copy a macro from one workbook to another I would like to create a macro to copy a macro from one workbooks module area to another workbooks "ThisWorkbook" area. The first workbook is the master and any other workbook would be subsets of the master. The idea is to have a macro that will further lock cells from input (sub workbook_open) on the child workbooks. Any help would be appreciated Rich -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com
$$Excel-Macros$$ Macro to copy a macro from one workbook to another
I would like to create a macro to copy a macro from one workbooks module area to another workbooks "ThisWorkbook" area. The first workbook is the master and any other workbook would be subsets of the master. The idea is to have a macro that will further lock cells from input (sub workbook_open) on the child workbooks. Any help would be appreciated Rich -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. -- To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com