Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default How to split an excel workbook in code and data

Subject: How to split an excel workbook in code and data

I have a complex excel file (.xlsm). It has several complex sheets and complex macros. This workbook (excel file) will be used by many different users who will enter data in the excel file and run macros.

What I want is to split this excel file into two – “data” and “code”; so if any changes are required, they are made in one place “code” and this “code” excel file is included in “data”, so different users can enter different data, but “code” is same. Appreciate your expert opinion how to do it. I thought of following:
1. In one excel file “code” have all the macros. In the second excel file “data” have all the worksheets. I think this is doable.
2. In second approach, have all the Marcos as well as work sheets in one “code” excel file and data file initially is blank. I do not know if I include this “code” excel file in “data” file whether all the worksheets will show up. Advantage of 2 over 1, if there are any changes made in worksheet such as title, color changes; they will be available to all the users (similar to macro). Not sure 2 can be done.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default How to split an excel workbook in code and data

Hi,

There is a great resource at http://www.cpearson.com/excel/vbe.aspx. Adapting a few of the macros from that site might do the trick.

For example, you could write a "copy" macro to delete modules and/or copy them between workbooks. That would allow you to maintain a "code" module separate from the "data" workbook. The "data" workbook would have a copy of the "code" module. As changes are made to the master "code" module, you could then run your "copy" macro to remove the module from the "data" workbook and export a copy of the current "code" module to it.

Good luck,
Ben
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default How to split an excel workbook in code and data

On Sep 20, 2:07*am, wrote:
Subject: How to split an excel workbook in code and data

I have a complex excel file (.xlsm). It has several complex sheets and complex macros. This workbook (excel file) will be used by many different users who will enter data in the excel file and run macros.

What I want is to split this excel file into two – “data” and *“code”; so if any changes are required, they are made in one place “code” and this “code” *excel file is included in “data”, so different users can enter different data, but “code” is same. Appreciate your expert opinion how to do it. I thought of following:
1. * * *In one excel file “code” have all the macros. In the second excel file “data” have all the worksheets. I think this is doable.
2. * * *In second approach, have all the Marcos as well as work sheets in one “code” excel file and data file initially is blank. I do not know if I include this “code” excel file in “data” file whether all the worksheets will show up. Advantage of 2 over 1, if there are any changes *made in worksheet such as title, color changes; they will be available to all the users (similar to macro). Not sure 2 can be done.


The standard way to do this is with an add-in, so a .xla file. Have a
look at that.

RBS
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
Stepping through VBA code, Excel not performing actions on split s pickytweety Excel Programming 3 March 25th 09 08:48 PM
Split data from 1 workbook into multiple workbooks based on criter bUncE Excel Worksheet Functions 0 October 29th 07 03:26 PM
I want to Split & save the data in different workbook Amol[_3_] Excel Programming 35 September 26th 07 12:42 PM
Split Workbook - improved code required HamishM[_11_] Excel Programming 8 February 13th 04 01:07 AM
split data in many workbook Dave Peterson[_3_] Excel Programming 0 July 23rd 03 02:47 AM


All times are GMT +1. The time now is 09:46 AM.

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"