LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Code generation

Hi Group,

I would like to create standard code templates, from (something like)
a form specifying parameters for the code generation. For instance,
for new class modules, you could specify a Foo property of type String
(byval/optional and defaulting to "FooString") and a user defined Bar
property of type BarClass, to be optionally initialized, and then the
generated "FooClass" Class Module would look like:

''''''''''''''''''''''''''''''''''''''''''''''''''
'Class Module: FooClass
'Created by: Name Surname
'Date Created: 23/07/2004
'Description: Foo is a Foo Class Module
''''''''''''''''''''''''''''''''''''''''''''''''''
'PRIVATE DATA MEMBERS
'''''''''''''''''''''''''''''''''''''''''''''''''

private m_strFoo as String
private m_oBarClass as BarClass
'''''''''''''''''''''''''''''''''''''''''''''''''
'PROPERTIES
'''''''''''''''''''''''''''''''''''''''''''''''''

Property Get Foo() As String
Foo = m_strFoo
End Property

Property Let Foo(Byval strFoo As String)
m_strFoo = strFoo
End Property

Property Get Bar() As BarClass
set Bar = m_oBar
End Property

Property Let Bar(oBar As BarClass)
set m_oBar = oBar
End Property
'''''''''''''''''''''''''''''''''''''''''''''''''
'CONSTRUCTORS / DESTRUCTORS
'''''''''''''''''''''''''''''''''''''''''''''''''

Public Sub Initialize(oBar as BarClass, _
optional byval strFoo as string = "FooString")
m_strFoo = strFoo
set m_oBar = oBar
End Sub

Private Sub Class_Terminate()
Set m_oBar = Nothing
End Sub

'''''''''''''''''''''''''''''''''''''''''''''''''
'PUBLIC METHODS
'''''''''''''''''''''''''''''''''''''''''''''''''

'''''''''''''''''''''''''''''''''''''''''''''''''
'PRIVATE METHODS
'''''''''''''''''''''''''''''''''''''''''''''''''

''''' FooClass Class Module terminates here '''''

I had a look at <http://www.cpearson.com/excel/vbe.htm, and I think
it is achievable, but has anyone already spent time on this? I don't
want to rewrite anything in a suboptimal way.
Is there any open source VBA editor I could use instead (even though I
doubt it would be as integrated and convenient as VBE)? Can I use the
*VB* editor to write VBA code within Excel .xls / .xla?

Any other comment welcome.

quantdev2004
 
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
Random Code Generation SRK Excel Worksheet Functions 2 November 7th 08 12:13 PM
PostScript generation in c# Ravi Excel Worksheet Functions 0 November 30th 07 05:15 AM
Date Generation Amanda Excel Worksheet Functions 4 June 4th 07 09:25 PM
Key Generation Sri Excel Discussion (Misc queries) 1 March 9th 07 03:53 PM
Report Generation Alan[_18_] Excel Programming 1 November 19th 03 01:46 AM


All times are GMT +1. The time now is 11:12 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"