P
PastorMike
I'm trying to execute the following in Outlook 2000 VBA:
Sub ExportAllVBA()
Dim VBComp As VBIDE.VBComponent
Dim Sfx As String
For Each VBComp In VBE.VBProjects.VBComponents
Select Case VBComp.Type
Case vbext_ct_ClassModule, vbext_ct_Document
Sfx = ".cls"
Case vbext_ct_MSForm
Sfx = ".frm"
Case vbext_ct_StdModule
Sfx = ".bas"
Case Else
Sfx = ""
End Select
If Sfx <> "" Then
VBComp.Export _
Filename:="C:\" & VBComp.Name & Sfx
End If
Next VBComp
End Sub
A reference is set in the VBE to VBA Extensibility 5.3.
SP3 is installed (build 9.0.0.6627).
On execution, VBE is flagged as "Variable not defined".
What is wrong?
Sub ExportAllVBA()
Dim VBComp As VBIDE.VBComponent
Dim Sfx As String
For Each VBComp In VBE.VBProjects.VBComponents
Select Case VBComp.Type
Case vbext_ct_ClassModule, vbext_ct_Document
Sfx = ".cls"
Case vbext_ct_MSForm
Sfx = ".frm"
Case vbext_ct_StdModule
Sfx = ".bas"
Case Else
Sfx = ""
End Select
If Sfx <> "" Then
VBComp.Export _
Filename:="C:\" & VBComp.Name & Sfx
End If
Next VBComp
End Sub
A reference is set in the VBE to VBA Extensibility 5.3.
SP3 is installed (build 9.0.0.6627).
On execution, VBE is flagged as "Variable not defined".
What is wrong?