Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Embedding VBA in New Workbook

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Embedding VBA in New Workbook

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

"Patrick" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Embedding VBA in New Workbook

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!

"Bernie Deitrick" wrote:

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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Embedding VBA in New Workbook

http://www.cpearson.com/excel/vbe.htm
Chip Pearson's page on working with code using code.
--
Regards,
Tom Ogilvy

"Patrick" wrote in message
...
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!

"Bernie Deitrick" wrote:

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




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
Embedding PDF simon Excel Discussion (Misc queries) 0 February 26th 10 04:12 PM
Embedding Indirect.ext Papergal Excel Discussion (Misc queries) 2 December 17th 08 06:28 PM
Embedding vlookup MeanArtichoke Excel Worksheet Functions 4 December 1st 08 01:05 AM
Pros and Cons of embedding Excel Workbook object in PPT Presentati Barb Reinhardt Excel Discussion (Misc queries) 0 May 29th 07 03:04 PM
Embedding Objects... Steven Sinclair Excel Discussion (Misc queries) 1 October 30th 06 09:18 PM


All times are GMT +1. The time now is 01:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"