LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy VBA code into a workbook created by a macro

Thanks, I'll try and see where I get!

"Dave Peterson" wrote:

I'd still use an addin. I think it's safer and easier to control.

But if you want to try writing code that writes code, start by reading Chip
Pearson's site:
http://www.cpearson.com/excel/vbe.aspx

Or you may want to use the template idea.



Planner Rob wrote:

Thanks for the discussion on this. If I eloborate a little maybe you can
advise me on my best course of action.

The source workbook is large with many complex formaula populating
information into a number of sheets. It is used by a number of people and it
is regularly enhanced and altered, both the formula and the code. This means
the this source workbook is (should be!) tracked and therefore kept up to
date.

The secondary workbook takes data from the first and summarises it into rows
of data, which can then be represented on a chart. The data is 'fixed' on
output (not linked to source workbook). The code is required to allow the
selection of which rows of data will be plotted on charts (one chart for each
selected). The secondary workbook needs to be able to continue to operate if
it is passed to a user who does not have the source workbook.

By being able to transfer code from the source to the secondary, it will
always contain the latest version of the code. Previous versions will not
need updating.

Is it possible to transfer some code?

"Dave Peterson" wrote:

I don't recall many projects that were actually finished--well, if the project
was discarded, then I guess it was finished <vbg.

In my experience, there was always a request for an enhancement.

And depending on what the changes could be, I guess you could have a user input
sheet where the user could keep track of important rules. But those would only
be as good as you thought of when you developed the program.

(Folder names, filenames, drives (UNC/Mapped) are all that kind of thing that
the user can modify and still stay out of code.)

norie wrote:

Dave

I suppose I've been lucky, most of the positions I had where working
with one or two people on specific projects.

And if the job got done properly everybody was happy - though that
didn't mean things didn't change,

In fact sometimes on certain projects the targets and hence the code/
whatever changed on a daily basis.

As for writing code mechanically - that's not really what I meant.

I meant write code that will cope with the changes.

Whether that's an option for this OP is impossible to tell without
seeing the code or at least more information on what it's purpose is.

Oh, and you can write code that will write/delete/alter code but doing
so can bring up other issues.

One of those issues is security, which I imagine could be a major
issue when dealing with multiple users.

--

Dave Peterson


--

Dave Peterson

 
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
workbook code - new sheet created... J.W. Aldridge Excel Programming 5 May 1st 09 09:24 PM
Macro Created but Not Running in Workbook alexaed Excel Worksheet Functions 9 August 14th 07 08:48 PM
Trying To Push Code For Worksheet_Change Into VBA-Created Workbook? (PeteCresswell) Excel Programming 1 July 6th 07 01:39 PM
How do I copy macro into new workbook that was created automatica. Darshan Excel Programming 3 January 11th 05 01:24 AM
Adding Code to the This_workbook module of a created workbook RPIJG[_68_] Excel Programming 1 July 9th 04 06:35 PM


All times are GMT +1. The time now is 07:27 AM.

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"