yes, look at Chip Pearson's site
www.cpearson.com
under "Programming to the VBE"
He has a nice page on how to add code to your files, through code.
"rael_lucid" wrote:
> Hi,
>
> Is it possible to create a VBA function or subroutine within Excel VBA?
>
> ie: I have a spreadsheet which has a number of functions in it. One of the
> functions involves creating a new spreadsheet (in a new file), based on some
> of the data in the original sheet. I now need to include a function in this
> new spreadsheet.
>
> Is this possible?
>
> Rael