LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default How to copy rows into an Excel *template* with vba

My vba knowledge is very limited. Appreciate it if someone can show me how to
do this programmatically:

I have a master list of products which are grouped by Product Family ID. For
each Product Family ID, I need to copy all products rows that belong to it
from the master list into an Excel template and save it as a new workbook
with the Product Family ID appended in the name. I also need the Prod. Family
ID to appear in cell B2 of the Excel template.

Sample of Master list structu
================================
ProductID | Product Name | Price per Unit | Product Family ID | Country


Sample Excel Template:
======================
There are 3 worksheets in the template. 1st & 3rd worksheet just contains
instructions & summary. The 2nd worksheet, "Product List", is the worksheet
where I want to copy the data in from the master list.

Product Family ID : ________ (cell B2)

ProductID | Product Name | Price per Unit | Product Family ID | Country |
Custom Calculation 1 | Custom Calculation 2 | Custom Calculation 3 | Formula
1 | Formula 2....

The Excel template contains macros and modules (the Custom calculation
fields in the template are custom vba functions, and there's a bunch of other
code under Worksheet_Change and in the "Product List" worksheet itself).

In addition, for each new workbook created:
1) The worksheet in the Excel template where we copy the products into needs
to be protected.
2) The vbaproject needs to be locked/protected too, to prevent others from
viewing the code and determine how some calculations are derived.

I'm desperate for help..... Manually copying and pasting to create 200
workbooks is tedious business :-(

Thanks,
Mikaela
 
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
VBA to copy a template worksheet to new excel workbook stainless Excel Programming 0 March 7th 07 11:11 PM
excel copy cells to word template [email protected] Excel Programming 0 August 5th 06 09:52 AM
How do I copy protect an Excel template videomag Excel Discussion (Misc queries) 1 August 2nd 05 08:22 PM
Need One Excel Template to copy to TWO Databases gildo4realdo Excel Discussion (Misc queries) 0 July 29th 05 03:57 PM
How do I copy a template in Excel? Heather Rossi Excel Worksheet Functions 1 January 10th 05 04:21 PM


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