![]() |
How do I define a macro that will generate VBA code?
Hi,
What I basically want to do is to press a button and have a new worksheet created and for that worksheet to have a ready-made set of subroutines pre-defined by me. Coming from a Java background, I'm used to defining a Class in which there are various subroutines and then calling a constructor method to create an instance of that class containing all the little subroutines etc. I haven't had much luck in finding any microsoft tutorials - can anyone help me out? Many thanks in advance! |
How do I define a macro that will generate VBA code?
Set up a workbook with one sheet which already has all the routines in them
and save it as a template (extension is .xlt and is saved as a file type of Template). When you want a new one created, use this template instead of a new worksheet. If you name it "sheet.xlt" and store it in the xlstart directory, it will be the default for all new sheets created( including the code) "I believe" <I wrote in message ... Hi, What I basically want to do is to press a button and have a new worksheet created and for that worksheet to have a ready-made set of subroutines pre-defined by me. Coming from a Java background, I'm used to defining a Class in which there are various subroutines and then calling a constructor method to create an instance of that class containing all the little subroutines etc. I haven't had much luck in finding any microsoft tutorials - can anyone help me out? Many thanks in advance! |
All times are GMT +1. The time now is 05:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com