Public Sub VBModulesToClassWrapperSample()
'See also:
' VBModulesToClassWrapper Function
' VBUtilitiesSample Subroutine
Const strFn = "VBModulesToClassWrapperSample"
Dim strInFiles As String
strInFiles = InputBox("Read Visual Basic 4.0 Modules: (Wildcards allowed; {Esc} cancels.)", strFn, "\Entisoft\Tools\*.Bas")
If Len(strInFiles) = 0 Then Exit Sub
Dim strOutFile As String
strOutFile = GetTempFileName(Null, strFn)
strOutFile = InputBox("Write VBA Class: (FILE WILL BE OVERWRITTEN; {Esc} cancels.)", strFn, strOutFile)
If Len(strOutFile) = 0 Then Exit Sub
Dim strClassHeader As String
strClassHeader = _
"VERSION 1.0 CLASS" & vbCrLf _
& "BEGIN" & vbCrLf _
& " MultiUse = -1 'True" & vbCrLf _
& "End" & vbCrLf _
& "Attribute VB_Name = ""Library""" & vbCrLf _
& "Attribute VB_Creatable = True" & vbCrLf _
& "Attribute VB_Exposed = True" & vbCrLf _
& "Attribute VB_Description = ""Entisoft Tools Object Library""" & vbCrLf _
& "' Entisoft Tools Object Library" & vbCrLf _
& "' Copyright " & Year(Date) & " Entisoft" & vbCrLf
strClassHeader = strClassHeader _
& "" & vbCrLf _
& "Option Explicit" & vbCrLf _
& "" & vbCrLf _
& "Private Sub Class_Initialize()" & vbCrLf _
& " ' Initialization code goes here." & vbCrLf _
& "End Sub" & vbCrLf _
& "" & vbCrLf _
& "Private Sub Class_Terminate()" & vbCrLf _
& " ' Termination code goes here." & vbCrLf _
& "End Sub"Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.