ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to paste macro to a newly created file using vba (https://www.excelbanter.com/excel-programming/408605-how-paste-macro-newly-created-file-using-vba.html)

noobi

how to paste macro to a newly created file using vba
 
Hello,

I have a workbook with numbers of macros - one of it translate data
numbers into text "in words". I've created a function which after
fullfilling datasheet, is copying it into a new file. And now I have a
problem, because in a new workbook there is no macro and of course there
isn't my function, so the datasheet doesn't works good.
I don't want to copy this function manually - I'd like to make it more
automatic /during copying data into a new workbook/. Unfortunatelly I
don't know how to do it.
If somebody knows how to do it, Please - show me an example.

thx,
Maleo

FSt1

how to paste macro to a newly created file using vba
 
hi
see this site..
http://cpearson.com/excel/vbe.aspx
it has detailed code on how to do that plus other things to. read down.
make note of warning!!!

Regards
FSt1

"noobi" wrote:

Hello,

I have a workbook with numbers of macros - one of it translate data
numbers into text "in words". I've created a function which after
fullfilling datasheet, is copying it into a new file. And now I have a
problem, because in a new workbook there is no macro and of course there
isn't my function, so the datasheet doesn't works good.
I don't want to copy this function manually - I'd like to make it more
automatic /during copying data into a new workbook/. Unfortunatelly I
don't know how to do it.
If somebody knows how to do it, Please - show me an example.

thx,
Maleo



All times are GMT +1. The time now is 03:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com