Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default 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!



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
Generate sequential numbers with define format. Marcos Excel Worksheet Functions 3 December 30th 08 04:27 PM
Need VBA Code to Let User Define Active Sheet zulfer7 Excel Discussion (Misc queries) 3 March 29th 07 02:59 PM
Looking for code to define a range Ant Excel Discussion (Misc queries) 3 October 3rd 05 06:22 PM
VBA code to define nbr of text character a a cell/column James[_35_] Excel Programming 0 March 18th 05 05:52 PM
VB code to generate an e-mail with an EXCEL attachment, but not se MJ Excel Programming 5 March 17th 05 07:10 PM


All times are GMT +1. The time now is 10:16 PM.

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"