Embedding VBA in New Workbook

P

Patrick

I am writing code behind an Excel workbook that will interface with my
mainframe, extract purchase order data, write it to the sheet, categorize it
by vendor, then write each vendor's data to a seperate workbook. Each new
workbook then gets sent to the specific vendor for updates to be made, is
sent back to me, and then populates the updated information back into the
mainframe.
My problem is that once I create each seperate vendor workbook I need to
embed the VBA code that allows that data to be sent back up into my
mainframe. Is there a way that I can have my main spreadsheet embed the
needed code (and command buttons) in the new sheets at the time they are
created?
Thanks!
patrick
 
B

Bernie Deitrick

Patrick,

Use a template file for the "seperate workbook" that you open, modify by
adding data, and then save as under an apprpriate name. The file should
have all the code, buttons, etc., and will greatly simplify the task.

HTH,
Bernie
MS Excel MVP
 
P

Patrick

Yes, I held that option as a fall-back plan. I was hoping to learn a new
trick today :) ...always looking to increase my skill set. Thanks for the
reply, Bernie!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top